pptp: fix stack info leak in pptp_getname()
authorMathias Krause <minipli@googlemail.com>
Wed, 19 Nov 2014 17:05:26 +0000 (18:05 +0100)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:05:13 +0000 (13:05 +0000)
commite1ce76057d59fb35b7b7f68326abbeebfb712a44
tree4356bac6e802ace9eacaf3be857c670522b0241a
parenta3886a39dcb54f4d702fc2583325e3ac6118ab6b
pptp: fix stack info leak in pptp_getname()

[ Upstream commit a5f6fc28d6e6cc379c6839f21820e62262419584 ]

pptp_getname() only partially initializes the stack variable sa,
particularly only fills the pptp part of the sa_addr union. The code
thereby discloses 16 bytes of kernel stack memory via getsockname().

Fix this by memset(0)'ing the union before.

Cc: Dmitry Kozlov <xeb@mail.ru>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ppp/pptp.c