Skip to contentSkip to conversation

FAILED: patch "[PATCH] wifi: nxpwifi: guard the 11ax response handlers against a" failed to apply to 7.3-stable tree

PATCH [email protected] 1 participant 1 message Nov 25

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 7.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-7.3.y
git checkout FETCH_HEAD
git cherry-pick -x 6a5cf549f4dcbd502db8cd00c5f49d20a2b9648f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026112554-preteen-repaying-2352@gregkh' --subject-prefix 'PATCH 7.3.y' 'HEAD^..'

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 6a5cf549f4dcbd502db8cd00c5f49d20a2b9648f Mon Sep 17 00:00:00 2001
From: Yehyeong Lee <[email protected]>
Date: Tue, 20 Oct 2026 09:50:25 +0900
Subject: [PATCH] wifi: nxpwifi: guard the 11ax response handlers against a
detached command buffer

nxpwifi_wait_queue_complete() clears curr_cmd->data_buf when a synchronous command is interrupted, but nxpwifi_process_cmdresp() still hands that field to the response handler. The three handlers in 11ax.c store through it without checking, so a late response oopses.

Check the buffer first and return 0 when it is NULL, as the sta_cmd.c handlers that commit 068986fd6f2a5 ("wifi: nxpwifi: detach sync command buffer on interrupted wait") covers already do.

This is a local denial of service: it needs an interrupted synchronous command and a late response, both on the local host.

Fixes 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x")
drivers/net/wireless/nxp/nxpwifi/11ax.c +11 -1
index dc1e747383ec..7e9127ae2f42 100644
@@ -205,9 +205,13 @@ int nxpwifi_ret_11ax_cfg(struct nxpwifi_private *priv,
 	struct host_cmd_11ax_cfg *he_cfg = &resp->params.ax_cfg;
 	struct nxpwifi_ie_types_header *header;
 	u16 left_len, tlv_type, tlv_len;
+	struct nxpwifi_11ax_he_cap_cfg *he_cap;
 	u8 ext_id;
-	struct nxpwifi_11ax_he_cap_cfg *he_cap = &ax_cfg->he_cap_cfg;
 
+	if (!ax_cfg)
+		return 0;
+
+	he_cap = &ax_cfg->he_cap_cfg;
 	left_len = le16_to_cpu(resp->size) - sizeof(*he_cfg) - S_DS_GEN;
 	header = (struct nxpwifi_ie_types_header *)he_cfg->tlv;
 
@@ -346,6 +350,9 @@ int nxpwifi_ret_11ax_cmd(struct nxpwifi_private *priv,
 	struct host_cmd_11ax_cmd *he_cmd = &resp->params.ax_cmd;
 	struct nxpwifi_ie_types_data *tlv;
 
+	if (!ax_cmd)
+		return 0;
+
 	ax_cmd->sub_id = le16_to_cpu(he_cmd->sub_id);
 
 	switch (ax_cmd->sub_command) {
@@ -584,6 +591,9 @@ int nxpwifi_ret_twt_cfg(struct nxpwifi_private *priv,
 	struct host_cmd_twt_cfg *twt_cfg_cmd = &resp->params.twt_cfg;
 	u16 action;
 
+	if (!twt_cfg)
+		return 0;
+
 	action = le16_to_cpu(twt_cfg_cmd->action);
 	twt_cfg->sub_id = le16_to_cpu(twt_cfg_cmd->sub_id);