Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v2 wireless 0/2] wifi: mwifiex: validate firmware response sizes
@ 2026-11-24 17:36 Tristan Madani
  2026-11-24 17:36 ` [PATCH v2 wireless 1/2] wifi: mwifiex: validate ext_scan buf_size against event buffer length Tristan Madani
  2026-11-24 17:36 ` [PATCH v2 wireless 2/2] wifi: mwifiex: validate command response size against " Tristan Madani
  0 siblings, 2 replies; 3+ messages in thread
From: Tristan Madani @ 2026-11-24 17:36 UTC (permalink / raw)
  To: Brian Norris
  Cc: Jeff Chen, Francesco Dolcini, Bing Zhao, Amitkumar Karwar,
	John W . Linville, linux-wireless, stable, Tristan Madani

From: Tristan Madani <tristan@talencesecurity.com>

Two missing bounds checks on firmware-provided size fields in mwifiex:

  1. ext_scan event: buf_size is used to determine scan response
     parsing length but never checked against the event buffer.

  2. command response: resp->size is passed to individual handlers
     but never validated against the response skb length.

Both patches add early validation that the declared size fits within
the actual buffer before proceeding with parsing.

Changes in v2:
- Patch 2/2: moved the response size check after timer_delete_sync()
  so the command timer is properly cancelled before the early return
  (Jeff Chen)

Tristan Madani (2):
  wifi: mwifiex: validate ext_scan buf_size against event buffer length
  wifi: mwifiex: validate command response size against buffer length

 drivers/net/wireless/marvell/mwifiex/cmdevt.c | 14 ++++++++++++++
 drivers/net/wireless/marvell/mwifiex/scan.c   |  9 +++++++++
 2 files changed, 23 insertions(+)

-- 
2.47.3

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

end of thread, other threads:[~2026-11-24 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 17:36 [PATCH v2 wireless 0/2] wifi: mwifiex: validate firmware response sizes Tristan Madani
2026-11-24 17:36 ` [PATCH v2 wireless 1/2] wifi: mwifiex: validate ext_scan buf_size against event buffer length Tristan Madani
2026-11-24 17:36 ` [PATCH v2 wireless 2/2] wifi: mwifiex: validate command response size against " Tristan Madani

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