Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH rtw-next v2 0/2] wifi: rtw88: check C2H header and payload lengths
@ 2026-10-31 17:56 Huihui Huang
  2026-10-31 17:56 ` [PATCH rtw-next v2 1/2] wifi: rtw88: drop C2H packets shorter than the C2H header Huihui Huang
  2026-10-31 17:56 ` [PATCH rtw-next v2 2/2] wifi: rtw88: check the C2H payload length before reading it Huihui Huang
  0 siblings, 2 replies; 5+ messages in thread
From: Huihui Huang @ 2026-10-31 17:56 UTC (permalink / raw)
  To: linux-wireless; +Cc: Huihui Huang, Ping-Ke Shih, Luka Gejak

Patch 1 drops C2H packets that are too short to hold the C2H header.
Patch 2 adds payload length checks to the handlers identified by Luka:
scan results, coexistence responses, HALMAC extended events and TX
reports. The header check remains a separate patch to keep the stable
backport small.

Other handlers, including rtw_coex_bt_info_notify(),
rtw_coex_bt_hid_info_notify(), rtw_fw_bcn_filter_notify(),
rtw_fw_adaptivity_result() and the GET_COEX_RESP_*() users of the
queued coexistence response, require a separate payload-length audit
and are outside the scope of this series.

Changes in v2:
- Patch 1: print the C2H length instead of the full skb length in the
  debug message, as suggested by Luka.
- Patch 1: clarify the description of accesses beyond skb->len.
- Patch 2: add payload length checks in response to Luka's review.

v1: https://lore.kernel.org/r/20261029170017.832708-1-hhhuang@smu.edu.sg

Huihui Huang (2):
  wifi: rtw88: drop C2H packets shorter than the C2H header
  wifi: rtw88: check the C2H payload length before reading it

 drivers/net/wireless/realtek/rtw88/coex.c |  3 ++-
 drivers/net/wireless/realtek/rtw88/fw.c   | 22 ++++++++++++++++++++--
 drivers/net/wireless/realtek/rtw88/fw.h   |  8 ++++++++
 drivers/net/wireless/realtek/rtw88/tx.c   |  3 +++
 4 files changed, 33 insertions(+), 3 deletions(-)


base-commit: 9b0be45d4d52fd223994e151f169743a97abd290
-- 
2.43.0


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

end of thread, other threads:[~2026-11-02  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-31 17:56 [PATCH rtw-next v2 0/2] wifi: rtw88: check C2H header and payload lengths Huihui Huang
2026-10-31 17:56 ` [PATCH rtw-next v2 1/2] wifi: rtw88: drop C2H packets shorter than the C2H header Huihui Huang
2026-11-02  9:10   ` Luka Gejak
2026-10-31 17:56 ` [PATCH rtw-next v2 2/2] wifi: rtw88: check the C2H payload length before reading it Huihui Huang
2026-11-02  9:05   ` Luka Gejak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox