pppoe: check sockaddr length in pppoe_connect()
authorGuillaume Nault <g.nault@alphalink.fr>
Mon, 23 Apr 2018 14:38:27 +0000 (16:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Apr 2018 01:12:15 +0000 (21:12 -0400)
commita49e2f5d5fb141884452ddb428f551b123d436b5
treeab6db419604880f6a732256c543be5adfbd2a2d9
parenteb1c28c05894a4b1f6b56c5bf072205e64cfa280
pppoe: check sockaddr length in pppoe_connect()

We must validate sockaddr_len, otherwise userspace can pass fewer data
than we expect and we end up accessing invalid data.

Fixes: 224cf5ad14c0 ("ppp: Move the PPP drivers")
Reported-by: syzbot+4f03bdf92fdf9ef5ddab@syzkaller.appspotmail.com
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp/pppoe.c