From: Maoyi Xie <maoyixie.tju@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH rtw-next v3 0/4] wifi: rtw89: check lengths and indices reported by the chip
Date: Fri, 4 Dec 2026 15:49:40 +0800 [thread overview]
Message-ID: <20261204074944.2942452-1-maoyixie.tju@gmail.com> (raw)
These patches add checks for two lengths and two indices that the chip
reports. The patches are independent.
Found with a CodeQL-based static analysis tool that we are developing.
Each case was reproduced in a userspace harness under AddressSanitizer.
Not tested on hardware. Compile-tested with W=1 on rtw-next.
I used an LLM to help write the harnesses and these patches.
Changes in v3:
- 1/4: bound the pkt_size fallback instead of the end of the copy.
- 3/4: check len in the LPS report handler, as Ping-Ke Shih suggested.
Changes in v2:
- 1/4, 3/4: check the lengths earlier, as Ping-Ke Shih suggested.
3/4 has a new subject.
- 2/4, 4/4: add Acked-by.
v2: https://lore.kernel.org/linux-wireless/20261202090507.1613331-1-maoyixie.tju@gmail.com/
v1: https://lore.kernel.org/linux-wireless/20261201090138.3652600-1-maoyixie.tju@gmail.com/
Maoyi Xie (4):
wifi: rtw89: pci: reject oversized RX packets
wifi: rtw89: pci: validate hardware index of BD ring
wifi: rtw89: fw: check C2H event length
wifi: rtw89: phy: check cur_idx of TAS power report
drivers/net/wireless/realtek/rtw89/fw.c | 3 +++
drivers/net/wireless/realtek/rtw89/pci.c | 20 ++++++++++++++++++--
drivers/net/wireless/realtek/rtw89/phy.c | 6 ++++++
3 files changed, 27 insertions(+), 2 deletions(-)
--
2.34.1
next reply other threads:[~2026-12-04 7:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 7:49 Maoyi Xie [this message]
2026-12-04 7:49 ` [PATCH rtw-next v3 1/4] wifi: rtw89: pci: reject oversized RX packets Maoyi Xie
2026-12-06 2:04 ` Ping-Ke Shih
2026-12-04 7:49 ` [PATCH rtw-next v3 2/4] wifi: rtw89: pci: validate hardware index of BD ring Maoyi Xie
2026-12-04 7:49 ` [PATCH rtw-next v3 3/4] wifi: rtw89: fw: check C2H event length Maoyi Xie
2026-12-06 2:05 ` Ping-Ke Shih
2026-12-04 7:49 ` [PATCH rtw-next v3 4/4] wifi: rtw89: phy: check cur_idx of TAS power report Maoyi Xie
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=20261204074944.2942452-1-maoyixie.tju@gmail.com \
--to=maoyixie.tju@gmail.com \
--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 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.