Skip to contentSkip to conversation

wifi: ieee80211: Fix for Rx fragmented action frames

PATCH New Gilad Itzkovitch 1 participant 1 message Nov 24, 2022 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 wifi: ieee80211: Fix for Rx fragmented action frames

The ieee80211_accept_frame() function performs a number of early checks to decide whether or not further processing needs to be done on a frame. One of those checks is the ieee80211_is_robust_mgmt_frame() function. It requires to peek into the frame payload, but because defragmentation does not occur until later on in the receive path, this peek is invalid for any fragment other than the first one. Also, in this scenario there is no STA and so the fragmented frame will be dropped later on in the process and will not reach the upper stack. This can happen with large action frames at low rates, for example, we see issues with DPP on S1G.

This change will only check if the frame is robust if it's the first fragment. Invalid fragmented packets will be discarded later after defragmentation is completed.

---
 net/mac80211/rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/mac80211/rx.c +2 -1
index c28c6fbf786e..4e992d9a7b61 100644
@@ -4215,7 +4215,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
 	case NL80211_IFTYPE_STATION:
 		if (!bssid && !sdata->u.mgd.use_4addr)
 			return false;
-		if (ieee80211_is_robust_mgmt_frame(skb) && !rx->sta)
+		if (ieee80211_is_first_frag(hdr->seq_ctrl) &&
+		    ieee80211_is_robust_mgmt_frame(skb) && !rx->sta)
 			return false;
 		if (multicast)
 			return true;

base-commit: 015d1787f3d9911a5431b54d840bf5042167ba98

Signature · 1 line
2.25.1