mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
mac80211: add length check in ieee80211_is_robust_mgmt_frame()
A few places weren't checking that the frame passed to the function actually has enough data even though the function clearly documents it must have a payload byte. Make this safer by changing the function to take an skb and checking the length inside. The old version is preserved for now as the rtl* drivers use it and don't have a correct skb. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
ae811e21df
commit
d8ca16db6b
8 changed files with 28 additions and 19 deletions
|
@ -393,7 +393,7 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
|
|||
/* In testing, hdr was NULL here */
|
||||
return false;
|
||||
}
|
||||
if ((ieee80211_is_robust_mgmt_frame(hdr)) &&
|
||||
if ((_ieee80211_is_robust_mgmt_frame(hdr)) &&
|
||||
(ieee80211_has_protected(hdr->frame_control)))
|
||||
rx_status->flag &= ~RX_FLAG_DECRYPTED;
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue