From: Jiale Yao <yaojiale02@163.com>
To: Jeff Johnson <jjohnson@kernel.org>,
Karthikeyan Periyasamy <quic_periyasa@quicinc.com>,
Balamurugan Selvarajan <quic_bselvara@quicinc.com>,
Carl Huang <quic_cjhuang@quicinc.com>,
Kalle Valo <kvalo@kernel.org>,
Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>,
linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH 4/5] wifi: ath12k: validate DMA buffer release fixed TLV length
Date: Wed, 28 Oct 2026 13:12:53 +0800 [thread overview]
Message-ID: <20261028051254.147628-5-yaojiale02@163.com> (raw)
In-Reply-To: <20261028051254.147628-1-yaojiale02@163.com>
The DMA buffer release parser copies the fixed parameters from a
firmware TLV without checking that its payload contains the complete
structure. A short TLV can therefore make the structure copy read past
the declared payload.
Add a minimum-length policy for the fixed DMA buffer release TLV.
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Cc: stable@vger.kernel.org
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
drivers/net/wireless/ath/ath12k/wmi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 75b259990c79..ea7771a2eea9 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -209,6 +209,8 @@ static const struct ath12k_wmi_tlv_policy ath12k_wmi_tlv_policies[] = {
.min_len = sizeof(struct wmi_obss_color_collision_event) },
[WMI_TAG_PDEV_CSA_SWITCH_COUNT_STATUS_EVENT] = {
.min_len = sizeof(struct ath12k_wmi_pdev_csa_event) },
+ [WMI_TAG_DMA_BUF_RELEASE] = {
+ .min_len = sizeof(struct ath12k_wmi_dma_buf_release_fixed_params) },
};
__le32 ath12k_wmi_tlv_hdr(u32 cmd, u32 len)
--
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 ` [PATCH 3/5] wifi: ath11k: validate DMA ring " Jiale Yao
2026-10-28 5:12 ` Jiale Yao [this message]
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-5-yaojiale02@163.com \
--to=yaojiale02@163.com \
--cc=ath12k@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_bselvara@quicinc.com \
--cc=quic_cjhuang@quicinc.com \
--cc=quic_periyasa@quicinc.com \
--cc=quic_pradeepc@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®