]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: ath11k: fix NULL dereference in ath11k_qmi_m3_load()
authorMatvey Kovalev <matvey.kovalev@ispras.ru>
Wed, 17 Sep 2025 19:20:01 +0000 (22:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Oct 2025 09:18:48 +0000 (11:18 +0200)
commit888830b2cbc035838bebefe94502976da94332a5
treebe22df0203cd5fe4c87fef530ef29a2a60c4d348
parent9cddad3b26dac830407d2d3c0de5205ff6d6dda0
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: 7db88b962f06 ("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>
drivers/net/wireless/ath/ath11k/qmi.c