ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl()
Subsystems (3)
PATCH 1/1 ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl()
From: Eric Dumazet <[email protected]>
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 <[email protected]>
Cc Alexander Aring <[email protected]>
Cc Stefan Schmidt <[email protected]>
Reported-by syzbot <[email protected]>
--- drivers/net/ieee802154/mac802154_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/mac802154_hwsim.c +1 -1
@@ -480,7 +480,7 @@ static int hwsim_del_edge_nl(struct sk_buff *msg, struct genl_info *info)struct hwsim_edge *e;u32 v0, v1; -if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID ] && +if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID ] || !info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE ])return -EINVAL ;
Signature · 1 line
2.32.0.288.g62a8d224e6-goog
Hi,
Quoted 11 lines · Eric Dumazet
From: Eric Dumazet <[email protected]>
Both
MAC802154_HWSIM_ATTR_RADIO_IDandMAC802154_HWSIM_ATTR_RADIO_EDGEmust be present to avoid a crash.Fixes f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")Signed-off-by Eric Dumazet <[email protected]>Cc Alexander Aring <[email protected]>Cc Stefan Schmidt <[email protected]>Reported-by syzbot <[email protected]>
Acked-by Alexander Aring <[email protected]>
Thanks!
- Alex
Stefan Schmidt
maintainerHello.
Quoted 15 lines · Alexander Aring
Hi,
Quoted 11 lines · Eric Dumazet
From: Eric Dumazet <[email protected]>
Both
MAC802154_HWSIM_ATTR_RADIO_IDandMAC802154_HWSIM_ATTR_RADIO_EDGEmust be present to avoid a crash.Fixes f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")Signed-off-by Eric Dumazet <[email protected]>Cc Alexander Aring <[email protected]>Cc Stefan Schmidt <[email protected]>Reported-by syzbot <[email protected]>
Quoted 3 lines
Acked-by Alexander Aring <[email protected]>Thanks!
This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks!
regards
Stefan Schmidt