]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2012 22:08:39 +0000 (18:08 -0400)
commitd2c328de566d09fbb268f9c2a65173e2a542a9d9
treefcebdddebb3990a07644c49f335b6193edaf6cb1
parent96f6e6a81ef09c25bc555b5d5489cde61ed4bf4d
xfrm_user: fix info leak in copy_to_user_policy()

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>
net/xfrm/xfrm_user.c