wifi: cfg80211: check A-MSDU format more carefully
authorJohannes Berg <johannes.berg@intel.com>
Mon, 26 Feb 2024 19:34:06 +0000 (20:34 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 4 Mar 2024 13:28:37 +0000 (14:28 +0100)
commit9ad7974856926129f190ffbe3beea78460b3b7cc
tree757f8b024473dc08a921afed812e26126ca268ba
parent4223675d2b5912060a85e48fd8fee51207e00957
wifi: cfg80211: check A-MSDU format more carefully

If it looks like there's another subframe in the A-MSDU
but the header isn't fully there, we can end up reading
data out of bounds, only to discard later. Make this a
bit more careful and check if the subframe header can
even be present.

Reported-by: syzbot+d050d437fe47d479d210@syzkaller.appspotmail.com
Link: https://msgid.link/20240226203405.a731e2c95e38.I82ce7d8c0cc8970ce29d0a39fdc07f1ffc425be4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/util.c