The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] wifi: iwlwifi: mvm: bound BA-window station ID
@ 2026-07-11 15:06 Michael Bommarito
  2026-07-11 15:06 ` [PATCH 1/2] wifi: iwlwifi: mvm: check BA-window station ID before lookup Michael Bommarito
  2026-07-11 15:06 ` [PATCH 2/2] wifi: iwlwifi: mvm: add KUnit coverage for BA-window station ID bounds Michael Bommarito
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Bommarito @ 2026-07-11 15:06 UTC (permalink / raw)
  To: Miri Korenblit, Johannes Berg
  Cc: Emmanuel Grumbach, Benjamin Berg, linux-wireless, linux-kernel,
	stable

iwl_mvm_window_status_notif() extracts a 5-bit station ID from the
firmware's BA-window status notification (values up to 31) and indexes
mvm->fw_id_to_mac_id[] with it without first checking it against the
firmware's station capacity. A firmware/backend notification carrying an
out-of-range ID reads past the station map.

Patch 1 validates the station ID against mvm->fw->ucode_capa.num_stations
before the lookup, matching the existing MVM station-lookup helpers. Patch
2 adds KUnit coverage: the malformed out-of-range ID and a valid-ID/
null-station control that must still pass.

Reproduced with the KUnit test under UBSAN bounds: the malformed case
reports an array-index-out-of-bounds splat on stock and passes after the
fix; the valid-ID control passes on both.

Cc: stable@vger.kernel.org

Michael Bommarito (2):
  wifi: iwlwifi: mvm: check BA-window station ID before lookup
  wifi: iwlwifi: mvm: add KUnit coverage for BA-window station ID bounds

 drivers/net/wireless/intel/iwlwifi/mvm/rx.c   |  4 +
 .../wireless/intel/iwlwifi/mvm/tests/Makefile |  2 +-
 .../intel/iwlwifi/mvm/tests/window-status.c   | 77 +++++++++++++++++++
 3 files changed, 82 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mvm/tests/window-status.c

--
2.53.0

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

end of thread, other threads:[~2026-07-11 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-11 15:06 [PATCH 0/2] wifi: iwlwifi: mvm: bound BA-window station ID Michael Bommarito
2026-07-11 15:06 ` [PATCH 1/2] wifi: iwlwifi: mvm: check BA-window station ID before lookup Michael Bommarito
2026-07-11 15:06 ` [PATCH 2/2] wifi: iwlwifi: mvm: add KUnit coverage for BA-window station ID bounds Michael Bommarito

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