]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: fix info leak in compat dev_ifconf()
authorMathias Krause <minipli@googlemail.com>
Wed, 15 Aug 2012 11:31:57 +0000 (11:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:38:48 +0000 (10:38 -0700)
commitd8c8c1837a00c6da2522add7297af65166a23306
treed8415cb3bec48f159dd4371686fee1b2f0dff2b9
parentdeec7451985732043ec92eb3925ba4f08df8a5d9
net: fix info leak in compat dev_ifconf()

[ Upstream commit 43da5f2e0d0c69ded3d51907d9552310a6b545e8 ]

The implementation of dev_ifconf() for the compat ioctl interface uses
an intermediate ifc structure allocated in userland for the duration of
the syscall. Though, it fails to initialize the padding bytes inserted
for alignment and that for leaks four bytes of kernel stack. Add an
explicit memset(0) before filling the structure to avoid the info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/socket.c