]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
l2tp: check sockaddr length in pppol2tp_connect()
authorGuillaume Nault <g.nault@alphalink.fr>
Mon, 23 Apr 2018 14:15:14 +0000 (16:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Apr 2018 01:10:43 +0000 (21:10 -0400)
commiteb1c28c05894a4b1f6b56c5bf072205e64cfa280
tree0de3c2e5837660745019af3c67e19249105b86c3
parentb6a930fa88083b41d26ddf1cab95cbd740936c22
l2tp: check sockaddr length in pppol2tp_connect()

Check sockaddr_len before dereferencing sp->sa_protocol, to ensure that
it actually points to valid data.

Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
Reported-by: syzbot+a70ac890b23b1bf29f5c@syzkaller.appspotmail.com
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_ppp.c