ppp: fix out-of-bounds access in bpf_prog_create()
authorEric Biggers <ebiggers@google.com>
Thu, 5 Dec 2019 05:54:19 +0000 (21:54 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Dec 2019 22:45:19 +0000 (14:45 -0800)
commit0033b34a03ec5cf747cdaf9b1f9dceb91c020f17
tree299f3f47c09c1e21245194204662b96bb73ef6a1
parenta116f4e238cc20dfbac30c65949752798f5b6efa
ppp: fix out-of-bounds access in bpf_prog_create()

sock_fprog_kern::len is in units of struct sock_filter, not bytes.

Fixes: 3e859adf3643 ("compat_ioctl: unify copy-in of ppp filters")
Reported-by: syzbot+eb853b51b10f1befa0b7@syzkaller.appspotmail.com
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp/ppp_generic.c