]> 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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 10 Oct 2012 02:31:22 +0000 (03:31 +0100)
commit744e0a9c51333d712e76850bf58b4aeb277016fe
tree703a3ad1fdd95e7c26d315816a8ebe7775b5ffe3
parentae0673d65c32a60868f4d7ba342f527c334244a5
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: Ben Hutchings <ben@decadent.org.uk>
net/xfrm/xfrm_user.c