From: Jiale Yao <yaojiale02@163.com>
To: Jeff Johnson <jjohnson@kernel.org>,
Maharaja Kennadyrajan <quic_mkenna@quicinc.com>,
Sriram R <quic_srirrama@quicinc.com>,
Anilkumar Kolli <quic_akolli@quicinc.com>,
Ganesh Sesetti <gseset@codeaurora.org>,
Julia Lawall <julia.lawall@lip6.fr>,
linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Jiale Yao <jiale.yao@example.com>
Subject: [PATCH 3/4] wifi: ath11k: validate ready event MAC address array length
Date: Mon, 19 Oct 2026 18:00:28 +0800 [thread overview]
Message-ID: <20261019100029.1908660-4-yaojiale02@163.com> (raw)
In-Reply-To: <20261019100029.1908660-1-yaojiale02@163.com>
From: Jiale Yao <jiale.yao@example.com>
The ready event reports the number of extra MAC addresses separately
from the fixed-structure address array. ath11k checks the reported
count before assigning addresses to radios, but does not check the
length of the array TLV. A truncated array therefore causes reads past
the supplied event data.
Validate the array capacity before copying any addresses.
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Jiale Yao <jiale.yao@example.com>
---
drivers/net/wireless/ath/ath11k/wmi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 995fee2ffdfa..9a048c7d9858 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -7328,6 +7328,9 @@ static int ath11k_wmi_tlv_rdy_parse(struct ath11k_base *ab, u16 tag, u16 len,
if (!(ab->num_radios > 1 && num_mac_addr >= ab->num_radios))
break;
+ if (len / sizeof(*addr_list) < ab->num_radios)
+ return -EINVAL;
+
for (i = 0; i < ab->num_radios; i++) {
pdev = &ab->pdevs[i];
ether_addr_copy(pdev->mac_addr, addr_list[i].addr);
--
2.34.1
next prev parent reply other threads:[~2026-10-19 10:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 10:00 [PATCH 0/4] wifi: ath11k/ath12k: validate firmware array lengths Jiale Yao
2026-10-19 10:00 ` [PATCH 1/4] wifi: ath11k: validate extended regulatory capability count Jiale Yao
2026-10-19 10:00 ` [PATCH 2/4] wifi: ath12k: " Jiale Yao
2026-10-19 10:00 ` Jiale Yao [this message]
2026-10-19 10:00 ` [PATCH 4/4] wifi: ath12k: validate ready event MAC address array length Jiale Yao
2026-10-19 10:05 [PATCH 0/4] wifi: ath11k/ath12k: validate firmware array lengths Jiale Yao
2026-10-19 10:05 ` [PATCH 3/4] wifi: ath11k: validate ready event MAC address array length Jiale Yao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261019100029.1908660-4-yaojiale02@163.com \
--to=yaojiale02@163.com \
--cc=ath11k@lists.infradead.org \
--cc=gseset@codeaurora.org \
--cc=jiale.yao@example.com \
--cc=jjohnson@kernel.org \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_akolli@quicinc.com \
--cc=quic_mkenna@quicinc.com \
--cc=quic_srirrama@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®