]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Mar 2018 16:19:26 +0000 (11:19 -0500)
commit1f079aae50da57d9b7eed4900f1208034b3cb517
treeb404754c663a0a14cae3a37355f4669f54efad0f
parent63a95f6ee65d150b39806c0c870f1a3fc40c5f9e
ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event()

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: 0f3bd5eb3376b ("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>
net/ieee802154/6lowpan/core.c