Skip to content

wifi: rtw89: check lengths and indices reported by the chip

Maoyi Xie linux-wireless 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 0 repliesNew
  2. v14 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- 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.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4wifi: rtw89: pci: reject oversized RX packetsdrivers/net/wireless/realtek/rtw89/pci.c+16 -10 replies
2/4wifi: rtw89: pci: validate hardware index of BD ringdrivers/net/wireless/realtek/rtw89/pci.c+6 -00 replies
3/4wifi: rtw89: fw: check C2H event lengthdrivers/net/wireless/realtek/rtw89/fw.c drivers/net/wireless/realtek/rtw89/phy.c+6 -00 replies
4/4wifi: rtw89: phy: check cur_idx of TAS power reportdrivers/net/wireless/realtek/rtw89/phy.c+3 -00 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchPing-Ke Shih
1/4
2/4A-b
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH rtw-next v2 0/4] wifi: rtw89: check lengths and indices reported by the chip

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 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.

v1: https://lore.kernel.org/linux-wireless/[email protected]/

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 | 23 ++++++++++++++++++++++-
 drivers/net/wireless/realtek/rtw89/phy.c |  6 ++++++
 3 files changed, 31 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1