pptp: fix stack info leak in pptp_getname()
authorMathias Krause <minipli@googlemail.com>
Wed, 19 Nov 2014 17:05:26 +0000 (18:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2014 23:05:47 +0000 (15:05 -0800)
commitf0eed5a220e777b9e01b9eb45d7e387a35f1f6fa
tree8ce38bd9dc8ecc0779c9c2dc6f72ea6f7e60eafc
parent3b0c6ddf7b237a203de34024de655cbb30e928b2
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