Skip to content

Commit 1f52119

Browse files
Matvey Kovalevgregkh
authored andcommitted
wifi: ath11k: fix NULL dereference in ath11k_qmi_m3_load()
commit 3fd2ef2ae2b5c955584a3bee8e83ae7d7a98f782 upstream. 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: 7db88b9 ("wifi: ath11k: add firmware-2.bin support") Cc: [email protected] Signed-off-by: Matvey Kovalev <[email protected]> Reviewed-by: Baochen Qiang <[email protected]> Reviewed-by: Vasanthakumar Thiagarajan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4e5f060 commit 1f52119

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/ath/ath11k

1 file changed

+1
-1
lines changed

drivers/net/wireless/ath/ath11k/qmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2550,7 +2550,7 @@ static int ath11k_qmi_m3_load(struct ath11k_base *ab)
25502550
GFP_KERNEL);
25512551
if (!m3_mem->vaddr) {
25522552
ath11k_err(ab, "failed to allocate memory for M3 with size %zu\n",
2553-
fw->size);
2553+
m3_len);
25542554
ret = -ENOMEM;
25552555
goto out;
25562556
}

0 commit comments

Comments
 (0)