]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: mac80211: fix crash in beacon protection for P2P-device
authorJohannes Berg <johannes.berg@intel.com>
Wed, 5 Oct 2022 19:24:10 +0000 (21:24 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 10 Oct 2022 07:51:25 +0000 (09:51 +0200)
commit3d04d91fe28b9cda1dfcf3a71452b2face6135d3
treeb42273b943f6b90efd5f66511ace7b320464bdae
parentc895c85bc893f1fbf56d26a5c5842d3c0d87849d
wifi: mac80211: fix crash in beacon protection for P2P-device

If beacon protection is active but the beacon cannot be
decrypted or is otherwise malformed, we call the cfg80211
API to report this to userspace, but that uses a netdev
pointer, which isn't present for P2P-Device. Fix this to
call it only conditionally to ensure cfg80211 won't crash
in the case of P2P-Device.

This fixes CVE-2022-42722.

Reported-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
Fixes: db4b582ffbd4 ("mac80211: Report beacon protection failures to user space")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c