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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 10 Oct 2012 02:31:23 +0000 (03:31 +0100)
[ 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: Ben Hutchings <ben@decadent.org.uk>

No differences found