From: Ping-Ke Shih <pkshih@realtek.com>
To: Bob Beckett <bob.beckett@collabora.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"Luka Gejak" <luka.gejak@linux.dev>,
Bitterblue Smith <rtl8821cerfe2@gmail.com>,
Timlee <timlee@realtek.com>,
"matthew.leach@collabora.com" <matthew.leach@collabora.com>,
"kernel@collabora.com" <kernel@collabora.com>
Subject: RE: rtw88: 8822CE passes corrupted A-MSDUs as hw-decrypted, poisoning CCMP replay counter
Date: Thu, 22 Oct 2026 05:39:55 +0000 [thread overview]
Message-ID: <90c40c3223c34562b2c171c52d987c2e@realtek.com> (raw)
In-Reply-To: <20261021190529.3893821-1-bob.beckett@collabora.com>
Bob Beckett <bob.beckett@collabora.com> wrote:
> On Wed, 21 Oct 2026 07:30:58 +0000, Ping-Ke Shih <pkshih@realtek.com> wrote:
> > Bob Beckett <bob.beckett@collabora.com> wrote:
> > >
> > > The AP's own PN sequence is consistent before and after the bad frame,
> > > so the corruption happens on the receive side.
> >
> > Maybe this is a hint to make a patch to defer (drop) reporting weird packet,
> > as Luka has fixed 3 of 4 problems.
I quickly checked the debug patches, which seem not detect if PN sequence is
correct after the bad frame, for example
seq PN
1 101
2 99999 // bad frame. should be 102.
3 103 // not detect this
Or I missed something?
> > > 4. For completeness: on these chips can RXBD_IDX or the
> > > buffer-descriptor RX tag ever be updated before the packet data DMA
> > > has completed, as described for WiFi 7 in rtw89 0bc7d1d4e63c?
> >
> > The RX tag in rtw88 located on memory allocated by dma_alloc_coherent(), and
> > the RX tag must be set after packet data MAC completed.
(fix typo: ... data DMA completed.)
>
> Understood that this is the design intent. My question was whether the host can
> ever observe the tag before the data. dma_alloc_coherent() only makes the tag
> visible to the CPU without cache maintenance; the payload is in a separate
> streaming mapping (a SWIOTLB bounce buffer on this platform), so the order in
> which the host sees them depends on the order of the device's PCIe writes.
> Relaxed Ordering is enabled on the 8822CE here (DevCtl RlxdOrd+).
> Does the 8822CE set the RO attribute on RX DMA writes, in particular the
> buffer-descriptor/tag update? If it does, the tag write may pass the payload
> writes.
>
> We are hoping to test this directly with the next round of tests. the rx_debug
> option re-syncs a suspect buffer 100 us later, so late payload writes might
> show up as changed bytes, and we can repeat the test with Relaxed Ordering
> disabled.
I'll check the behavior internally and get back to you.
next prev parent reply other threads:[~2026-10-22 5:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 19:11 rtw88: 8822CE passes corrupted A-MSDUs as hw-decrypted, poisoning CCMP replay counter Bob Beckett
2026-10-16 22:15 ` Luka Gejak
2026-10-17 8:36 ` Luka Gejak
2026-10-19 12:43 ` Matthew Leach
2026-10-19 16:30 ` Luka Gejak
2026-10-21 7:30 ` Ping-Ke Shih
2026-10-21 19:05 ` Bob Beckett
2026-10-21 19:05 ` [RFC PATCH rtw-next 1/5] wifi: rtw88: do not trust a claimed decryption Bob Beckett
2026-10-21 19:05 ` [RFC PATCH rtw-next 2/5] wifi: rtw88: report and optionally re-verify suspect hw-decrypted frames Bob Beckett
2026-10-21 19:05 ` [RFC PATCH rtw-next 3/5] wifi: rtw88: pci: optional RX buffer poisoning and recheck Bob Beckett
2026-10-21 19:05 ` [RFC PATCH rtw-next 4/5] wifi: rtw88: make the PN guard threshold a test parameter Bob Beckett
2026-10-21 19:05 ` [RFC PATCH rtw-next 5/5] wifi: rtw88: pci: clear CLKREQ/ASPM enables when disable_aspm is set Bob Beckett
2026-10-21 20:50 ` Luka Gejak
2026-10-22 5:39 ` Ping-Ke Shih [this message]
2026-10-22 12:31 ` rtw88: 8822CE passes corrupted A-MSDUs as hw-decrypted, poisoning CCMP replay counter Robert Beckett
2026-10-21 11:32 ` Bitterblue Smith
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=90c40c3223c34562b2c171c52d987c2e@realtek.com \
--to=pkshih@realtek.com \
--cc=bob.beckett@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-wireless@vger.kernel.org \
--cc=luka.gejak@linux.dev \
--cc=matthew.leach@collabora.com \
--cc=rtl8821cerfe2@gmail.com \
--cc=timlee@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