]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:38:40 +0000 (05:38 +0900)
commit37d61a27a59671d88279dcc4d331f950d4901d4d
treecd9a28ee5484e21e322634d00391658ec8e05259
parenta91af73f445cacfb0db4df3eb2e3d0ddeff43893
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>
net/xfrm/xfrm_user.c