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

[ Upstream commit 4c87308bdea31a7b4828a51f6156e6f721a1fcc9 ]

copy_to_user_auth() fails to initialize the remainder of alg_name and
therefore discloses up to 54 bytes of heap memory via netlink to
userland.

Use strncpy() instead of strcpy() to fill the trailing bytes of alg_name
with null bytes.

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