]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2012 22:08:39 +0000 (18:08 -0400)
commit4c87308bdea31a7b4828a51f6156e6f721a1fcc9
treeca428f394170c09015dc982c3371c04de0749c81
parent9db273f45686218e055a3738f3311048cbb54fee
xfrm_user: fix info leak in copy_to_user_auth()

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