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

[ Upstream commit 7b789836f434c87168eab067cfbed1ec4783dffd ]

The memory reserved to dump the xfrm policy includes multiple padding
bytes added by the compiler for alignment (padding bytes in struct
xfrm_selector and struct xfrm_userpolicy_info). Add an explicit
memset(0) before filling the buffer to avoid the heap 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