Skip to content

Commit 1f52119

Browse files
Matvey Kovalevgregkh
authored andcommitted
wifi: ath11k: fix NULL dereference in ath11k_qmi_m3_load()
commit 3fd2ef2 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: stable@vger.kernel.org Signed-off-by: Matvey Kovalev <matvey.kovalev@ispras.ru> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20250917192020.1340-1-matvey.kovalev@ispras.ru Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4e5f060 commit 1f52119

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/wireless/ath/ath11k

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)