]> 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 16:47:22 +0000 (09:47 -0700)
commit7a62b446c607d994f82a578bbca5995a0aa0183d
tree62fad98f506c174534f06835f1695c8d58c38f7e
parentb56518548aa6e99e80c6c67b5a7d7f2c8c614c74
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