]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGuangyu Sun <guangyu.sun@oracle.com>
Mon, 8 Oct 2012 17:00:03 +0000 (10:00 -0700)
commit4aeb7bbc34a0a7337e642864a08ffbca0dd4abf7
tree38a89ab5f857e5845f9a2741a646e1ba67a09a4e
parent12cda7f12b0e18f18898baf6fdef55b08cbb42ea
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>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
net/socket.c