ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl()
authorEric Dumazet <edumazet@google.com>
Mon, 21 Jun 2021 18:02:44 +0000 (11:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 15:07:16 +0000 (17:07 +0200)
commit7fc2cbe4c840b0307fbc9aeb098191e804ed3c73
tree3ce4545d27404cecb4b08cb77ffe4236122e8484
parent812801e0b924ef6fb6d64d401d8f31288ab2a696
ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl()

[ Upstream commit 0303b30375dff5351a79cc2c3c87dfa4fda29bed ]

Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE
must be present to avoid a crash.

Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexander Aring <alex.aring@gmail.com>
Cc: Stefan Schmidt <stefan@datenfreihafen.org>
Reported-by: syzbot <syzkaller@googlegroups.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210621180244.882076-1-eric.dumazet@gmail.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ieee802154/mac802154_hwsim.c