]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event()
authorEric Dumazet <edumazet@google.com>
Mon, 5 Mar 2018 16:51:03 +0000 (08:51 -0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 2 Apr 2018 10:19:49 +0000 (07:19 -0300)
commitfc9f895287455d1e739f8080798bf78e8009d3bf
treefc2650b20cfdb970e046ee43f36d68490cfe6b2e
parent1c81b04396e61fa47da46ec4c9a73fce03c9bd37
ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event()

BugLink: http://bugs.launchpad.net/bugs/1760585
[ Upstream commit ca0edb131bdf1e6beaeb2b8289fd6b374b74147d ]

A tun device type can trivially be set to arbitrary value using
TUNSETLINK ioctl().

Therefore, lowpan_device_event() must really check that ieee802154_ptr
is not NULL.

Fixes: 2c88b5283f60d ("ieee802154: 6lowpan: remove check on null")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexander Aring <alex.aring@gmail.com>
Cc: Stefan Schmidt <stefan@osg.samsung.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Acked-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
net/ieee802154/6lowpan/core.c