All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rtw-next 0/3] wifi: rtlwifi: don't mark unencrypted frames as decrypted
@ 2026-11-21 16:35 Zhao Li
  2026-11-21 16:35 ` [PATCH rtw-next 1/3] wifi: rtlwifi: rtl8192ce: " Zhao Li
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zhao Li @ 2026-11-21 16:35 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: Hemanth Selam, Morning Star, linux-wireless, linux-kernel

The SWDEC bit of an rtlwifi receive descriptor is set when a frame still
needs software decryption. It is also clear for a frame that was never
encrypted, so a driver that sets RX_FLAG_DECRYPTED from it alone tells
mac80211 that plaintext was decrypted. mac80211 then accepts an
unprotected unicast data frame although a pairwise key is installed, and
unprotected deauthentication and disassociation frames on a connection
that uses management frame protection.

Patches 1 and 2 set the flag only for a protected frame that is not a
robust management frame in rtl8192ce and rtl8192se, as the newer rtlwifi
chips do, and replace the vendor comment above the test, which no longer
matches. Patch 3 does the same for rtl8192cu, which also set the flag
for protected robust management frames and so skipped their software
decryption and MIC verification. It reads the header only when the URB
holds the frame control field.

The other rtlwifi receive descriptor parsers do not mark plaintext
frames as decrypted. rtl8188ee, rtl8192ee, rtl8723ae, rtl8723be and
rtl8821ae already use the same test. rtlwifi's process_agg_start()
marks only the DELBA frame it builds itself. The usb_rx_hdl hook of
rtl8192cu, whose _rtl_rx_process() sets the flag from SWDEC alone, is
never called.

rtl8192d (rtl8192de/rtl8192du) is intentionally left untouched here:
it checks the cipher reported in the RX descriptor, so unencrypted
frames are not marked as decrypted. However, when a cipher is reported
and SWDEC is clear, it still sets RX_FLAG_DECRYPTED for protected
robust management frames. Ping-Ke, does RTL8192D decrypt those in
hardware (or set SWDEC / report no cipher for them), or does it need a
robust management frame exclusion too?

Zhao Li (3):
  wifi: rtlwifi: rtl8192ce: don't mark unencrypted frames as decrypted
  wifi: rtlwifi: rtl8192se: don't mark unencrypted frames as decrypted
  wifi: rtlwifi: rtl8192cu: don't mark undecrypted frames as decrypted

 .../wireless/realtek/rtlwifi/rtl8192ce/trx.c    | 17 +++++------------
 .../wireless/realtek/rtlwifi/rtl8192cu/trx.c    | 14 ++++++++++----
 .../wireless/realtek/rtlwifi/rtl8192se/trx.c    | 16 +++++-----------
 3 files changed, 20 insertions(+), 27 deletions(-)


base-commit: 0bdc579dbfc251a6b6838ee9459b6771b948c617
-- 
2.56.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-21 16:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 16:35 [PATCH rtw-next 0/3] wifi: rtlwifi: don't mark unencrypted frames as decrypted Zhao Li
2026-11-21 16:35 ` [PATCH rtw-next 1/3] wifi: rtlwifi: rtl8192ce: " Zhao Li
2026-11-21 16:35 ` [PATCH rtw-next 2/3] wifi: rtlwifi: rtl8192se: " Zhao Li
2026-11-21 16:35 ` [PATCH rtw-next 3/3] wifi: rtlwifi: rtl8192cu: don't mark undecrypted " Zhao Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.