should_drop_frame() marks frames that only monitor interfaces should see. With two or more monitors on the channel, ieee80211_rx_monitor() gives them a copy and returns the original skb to the RX handlers. It also returns the original skb when monitors exist but none is on the frame's channel. Frames with a bad FCS or with RX_FLAG_ONLY_MONITOR then get normal RX processing. mt76, for example, sets RX_FLAG_ONLY_MONITOR on frames that fail its PN or MIC check. These frames also carry RX_FLAG_DECRYPTED and RX_FLAG_IV_STRIPPED, so the RX handlers accept them as decrypted. Free the original skb in these cases, as is done without a monitor. Noticed during an LLM-assisted code review. Reproduced in a userspace harness. Not tested on hardware. Fixes: 127f60bfa98f ("mac80211: rewrite monitor mode delivery logic") Fixes: f92e0cf19ae0 ("wifi: mac80211: filter on monitor interfaces based on configured channel") Cc: stable@vger.kernel.org Signed-off-by: Maoyi Xie --- I used an LLM to help write the harness and this patch. net/mac80211/rx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index a2356cd17691..650024af4cb6 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -959,6 +959,11 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb, if (!origskb) return NULL; + if (only_monitor) { + dev_kfree_skb(origskb); + return NULL; + } + return ieee80211_clean_skb(origskb, present_fcs_len, rtap_space); } -- 2.34.1