lkml.org 
[lkml]   [2014]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.14 16/73] pptp: fix stack info leak in pptp_getname()
    Date
    3.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Mathias Krause <minipli@googlemail.com>

    [ 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 | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    --- a/drivers/net/ppp/pptp.c
    +++ b/drivers/net/ppp/pptp.c
    @@ -506,7 +506,9 @@ static int pptp_getname(struct socket *s
    int len = sizeof(struct sockaddr_pppox);
    struct sockaddr_pppox sp;

    - sp.sa_family = AF_PPPOX;
    + memset(&sp.sa_addr, 0, sizeof(sp.sa_addr));
    +
    + sp.sa_family = AF_PPPOX;
    sp.sa_protocol = PX_PROTO_PPTP;
    sp.sa_addr.pptp = pppox_sk(sock->sk)->proto.pptp.src_addr;




    \
     
     \ /
      Last update: 2014-12-06 01:01    [W:4.033 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site