]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: mld: validate txq_id in TX response handler
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 15 Jul 2026 18:57:01 +0000 (21:57 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Thu, 16 Jul 2026 18:12:16 +0000 (21:12 +0300)
Validate txq_id from TX response notification before passing to
iwl_trans_reclaim(). Other reclaim paths in this file perform this
check to prevent out-of-bounds access on malformed notifications.

Assisted-by: GitHubCopilot:claude-haiku-4.5
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260715215523.b938c2dcf08d.I8a88ec359e229f1c41ac9c49fd9ce28a2b62b274@changeid
drivers/net/wireless/intel/iwlwifi/mld/tx.c

index 2185dade95f8cbfe137f4bc4c376dcb95c052ac9..2df6643a5aa80f54aa8b6be43c2a148050cffdc4 100644 (file)
@@ -1120,6 +1120,10 @@ void iwl_mld_handle_tx_resp_notif(struct iwl_mld *mld,
        ssn = le32_to_cpup((__le32 *)agg_status +
                           tx_resp->frame_count) & 0xFFFF;
 
+       if (IWL_FW_CHECK(mld, txq_id >= ARRAY_SIZE(mld->fw_id_to_txq),
+                        "Invalid txq id %d\n", txq_id))
+               return;
+
        __skb_queue_head_init(&skbs);
 
        /* we can free until ssn % q.n_bd not inclusive */