From: Jiale Yao <yaojiale02@163.com>
To: Jeff Johnson <jjohnson@kernel.org>,
Karthikeyan Periyasamy <quic_periyasa@quicinc.com>,
Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH 3/5] wifi: ath11k: validate DMA ring capability TLVs
Date: Wed, 28 Oct 2026 13:12:52 +0800 [thread overview]
Message-ID: <20261028051254.147628-4-yaojiale02@163.com> (raw)
In-Reply-To: <20261028051254.147628-1-yaojiale02@163.com>
The service-ready parser counts DMA ring capability TLVs and later
indexes the firmware array using the full structure stride. It does not
validate that each TLV payload covers that structure, so a short element
can cause out-of-bounds reads.
Add a minimum-length policy for DMA ring capability TLVs.
Fixes: bd6478559e27 ("ath11k: Add direct buffer ring support")
Cc: stable@vger.kernel.org
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
drivers/net/wireless/ath/ath11k/wmi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 8a73318704f3..c5c667828530 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -167,6 +167,8 @@ static const struct wmi_tlv_policy wmi_tlv_policies[] = {
.min_len = sizeof(struct wmi_dma_buf_release_meta_data) - TLV_HDR_SIZE },
[WMI_TAG_HW_MODE_CAPABILITIES] = {
.min_len = sizeof(struct wmi_hw_mode_capabilities) - TLV_HDR_SIZE },
+ [WMI_TAG_DMA_RING_CAPABILITIES] = {
+ .min_len = sizeof(struct wmi_dma_ring_capabilities) - TLV_HDR_SIZE },
};
#define PRIMAP(_hw_mode_) \
--
2.34.1
next prev parent reply other threads:[~2026-10-28 5:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 5:12 [PATCH 0/5] wifi: ath11k/ath12k: validate capability TLV lengths Jiale Yao
2026-10-28 5:12 ` [PATCH 1/5] wifi: ath11k: validate DMA buffer release " Jiale Yao
2026-10-28 5:12 ` [PATCH 2/5] wifi: ath11k: validate hardware mode capability TLVs Jiale Yao
2026-10-28 5:12 ` Jiale Yao [this message]
2026-10-28 5:12 ` [PATCH 4/5] wifi: ath12k: validate DMA buffer release fixed TLV length Jiale Yao
2026-10-28 5:12 ` [PATCH 5/5] wifi: ath12k: validate service-ready capability TLV lengths 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=20261028051254.147628-4-yaojiale02@163.com \
--to=yaojiale02@163.com \
--cc=ath11k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_periyasa@quicinc.com \
--cc=stable@vger.kernel.org \
/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®