]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfrm_user: fix info leak in copy_to_user_state()
authorMathias Krause <minipli@googlemail.com>
Wed, 19 Sep 2012 11:33:39 +0000 (11:33 +0000)
committerGuangyu Sun <guangyu.sun@oracle.com>
Wed, 17 Oct 2012 18:24:17 +0000 (11:24 -0700)
commit697fb151103d2ffb74223d9b9e5323c87111270a
treef97c1c5a1b647f64353d14dc2c61087c1fffe3a5
parent96017aff2cd0084c92f661aaa49e1b88688f001e
xfrm_user: fix info leak in copy_to_user_state()

[ Upstream commit f778a636713a435d3a922c60b1622a91136560c1 ]

The memory reserved to dump the xfrm state includes the padding bytes of
struct xfrm_usersa_info added by the compiler for alignment (7 for
amd64, 3 for i386). Add an explicit memset(0) before filling the buffer
to avoid the info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.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/xfrm/xfrm_user.c