]> git.karo-electronics.de Git - karo-tx-linux.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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 10 Oct 2012 02:31:23 +0000 (03:31 +0100)
commitbc39fa8d3deb34d5d0cfd86aafb8033ac4a4ed90
tree4fcbcc85d2207c7bf5c5862beff72e6ee8df5cb6
parente470a5bc5c80cad5d8877701784351c2d8cdb6bc
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: Ben Hutchings <ben@decadent.org.uk>
net/xfrm/xfrm_user.c