# \[PATCH 6.6 1414/1424\] wifi: ath11k: fix NULL dereference in ath11k\_qmi\_m3\_load()

- From: Greg Kroah-Hartman \<gregkh@linuxfoundation.org\>
- Date: 2026-09-12 15:22:40 
- List: stable
- Page: https://ratatoskr.run/stable/2026/09/17564167
- Thread: https://ratatoskr.run/stable/2026/09/17562589/t/19.md

```text
6.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Matvey Kovalev <redacted>

[ Upstream commit 3fd2ef2ae2b5c955584a3bee8e83ae7d7a98f782 ]

If ab->fw.m3_data points to data, then fw pointer remains null.
Further, if m3_mem is not allocated, then fw is dereferenced to be
passed to ath11k_err function.

Replace fw->size by m3_len.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 7db88b962f06 ("wifi: ath11k: add firmware-2.bin support")
Cc: <redacted>
Signed-off-by: Matvey Kovalev <redacted>
Reviewed-by: Baochen Qiang <redacted>
Reviewed-by: Vasanthakumar Thiagarajan <redacted>
Link: https://patch.msgid.link/20250917192020.1340-1-matvey.kovalev@ispras.ru
Signed-off-by: Jeff Johnson <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index dde60ca9d2b8b..c3723e49092ad 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -2550,7 +2550,7 @@ static int ath11k_qmi_m3_load(struct ath11k_base *ab)
 					   GFP_KERNEL);
 	if (!m3_mem->vaddr) {
 		ath11k_err(ab, "failed to allocate memory for M3 with size %zu\n",
-			   fw->size);
+			   m3_len);
 		ret = -ENOMEM;
 		goto out;
 	}
-- 
2.53.0



```
