From: Zhao Li <enderaoelyther@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: Hemanth Selam <hemanth.selam@gmail.com>,
Morning Star <alexbestoso@gmail.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH rtw-next 0/3] wifi: rtlwifi: don't mark unencrypted frames as decrypted
Date: Sun, 22 Nov 2026 00:35:44 +0800 [thread overview]
Message-ID: <20261121163547.37019-1-enderaoelyther@gmail.com> (raw)
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
next reply other threads:[~2026-11-21 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 16:35 Zhao Li [this message]
2026-11-21 16:35 ` [PATCH rtw-next 1/3] wifi: rtlwifi: rtl8192ce: don't mark unencrypted frames as decrypted 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
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=20261121163547.37019-1-enderaoelyther@gmail.com \
--to=enderaoelyther@gmail.com \
--cc=alexbestoso@gmail.com \
--cc=hemanth.selam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.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