Skip to content

Commit c8a41c6

Browse files
denkenzjmberg-intel
authored andcommitted
mac80211: Don't memset RXCB prior to PAE intercept
In ieee80211_deliver_skb_to_local_stack intercepts EAPoL frames if mac80211 is configured to do so and forwards the contents over nl80211. During this process some additional data is also forwarded, including whether the frame was received encrypted or not. Unfortunately just prior to the call to ieee80211_deliver_skb_to_local_stack, skb->cb is cleared, resulting in incorrect data being exposed over nl80211. Fixes: 018f6fb ("mac80211: Send control port frames over nl80211") Cc: [email protected] Signed-off-by: Denis Kenzior <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent b950057 commit c8a41c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/mac80211/rx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,6 +2452,8 @@ static void ieee80211_deliver_skb_to_local_stack(struct sk_buff *skb,
24522452
cfg80211_rx_control_port(dev, skb, noencrypt);
24532453
dev_kfree_skb(skb);
24542454
} else {
2455+
memset(skb->cb, 0, sizeof(skb->cb));
2456+
24552457
/* deliver to local stack */
24562458
if (rx->napi)
24572459
napi_gro_receive(rx->napi, skb);
@@ -2546,8 +2548,6 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
25462548

25472549
if (skb) {
25482550
skb->protocol = eth_type_trans(skb, dev);
2549-
memset(skb->cb, 0, sizeof(skb->cb));
2550-
25512551
ieee80211_deliver_skb_to_local_stack(skb, rx);
25522552
}
25532553

0 commit comments

Comments
 (0)