From: Rosen Penev <rosenp@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Jeff Johnson <jjohnson@kernel.org>,
Jouni Malinen <jouni.malinen@atheros.com>,
"John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH] wifi: ath: clear the keymap bits of default key slots on delete
Date: Tue, 24 Nov 2026 18:35:54 -0800 [thread overview]
Message-ID: <20261125023554.2342281-1-rosenp@gmail.com> (raw)
In station mode a hardware group key is installed in the key cache slot
matching its key index (1-3). ath_key_delete() returns early for slots
below IEEE80211_WEP_NKID, so their keymap bits are never cleared and
stay set after the key is gone.
ath9k_cmn_rx_skb_postprocess() marks a protected frame without a
hardware key match as RX_FLAG_DECRYPTED when the keymap bit of the key
ID in its IV is set. After any earlier network with a hardware group
key, a later network whose group key is done in software (GCMP,
GCMP-256, CCMP-256) then has all group-addressed data frames handed to
mac80211 as already decrypted. They are dropped, so the station never
answers ARP requests or other broadcasts from the AP side while
unicast keeps working.
The early return dates from when ath_init() marked slots 0-3 as
permanently in use. That was removed, but the early return was kept, so
the bits of these slots now stay set once a key has used them. Before
mac80211 gained software GCMP, GCMP-256 and CCMP-256, a later group key
normally went back into the same hardware slot, which hid the problem.
Seen on an AR9550 (Archer C7 v2, OpenWrt 25.12.6, backports 6.18.55) as
a station: wpa2-gcmp works on a freshly loaded driver, fails with 100%
loss of AP-originated pings after one wpa2-ccmp association and
recovers only after a module reload. With this change the sequence
GCMP, CCMP, GCMP, CCMP/TKIP-group, CCMP-256, CCMP with GTK rekeys,
GCMP-256 with BIP-GMAC-256 passes.
The slots below IEEE80211_WEP_NKID are never handed out by
ath_reserve_key_cache_slot(), so clearing their bits cannot free them
for another key.
Fixes: be2864cfff2f ("ath9k: Fixed RX decryption status reporting")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/wireless/ath/key.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c
index 0ae436bd9b66..0df26af987b7 100644
--- a/drivers/net/wireless/ath/key.c
+++ b/drivers/net/wireless/ath/key.c
@@ -593,8 +593,6 @@ void ath_key_delete(struct ath_common *common, u8 hw_key_idx)
ath_hw_keysetmac(common, hw_key_idx, NULL);
else
ath_hw_keyreset(common, hw_key_idx);
- if (hw_key_idx < IEEE80211_WEP_NKID)
- return;
clear_bit(hw_key_idx, common->keymap);
clear_bit(hw_key_idx, common->ccmp_keymap);
--
2.56.1
reply other threads:[~2026-11-25 2:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261125023554.2342281-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=jjohnson@kernel.org \
--cc=jouni.malinen@atheros.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox