mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiale Yao <yaojiale02@163.com>
To: Jeff Johnson <jjohnson@kernel.org>,
	Govindaraj Saminathan <quic_gsamin@quicinc.com>,
	Maharaja Kennadyrajan <quic_mkenna@quicinc.com>,
	Rajkumar Manoharan <rmanohar@codeaurora.org>,
	Sven Eckelmann <sven@narfation.org>,
	Sriram R <sriram.ramachandran@oss.qualcomm.com>,
	linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH 2/5] wifi: ath11k: validate hardware mode capability TLVs
Date: Wed, 28 Oct 2026 13:12:51 +0800	[thread overview]
Message-ID: <20261028051254.147628-3-yaojiale02@163.com> (raw)
In-Reply-To: <20261028051254.147628-1-yaojiale02@163.com>

The service-ready parser indexes hardware mode capability TLVs using the
full structure stride and reads their PHY maps without validating the
firmware-declared payload length.  A short TLV can therefore cause an
out-of-bounds read.

Add a minimum-length policy for hardware mode capability TLVs.

Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
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 0d4481a09501..8a73318704f3 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -165,6 +165,8 @@ static const struct wmi_tlv_policy wmi_tlv_policies[] = {
 		.min_len = sizeof(struct wmi_dma_buf_release_entry) - TLV_HDR_SIZE },
 	[WMI_TAG_DMA_BUF_RELEASE_SPECTRAL_META_DATA] = {
 		.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 },
 };
 
 #define PRIMAP(_hw_mode_) \
-- 
2.34.1


  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 ` Jiale Yao [this message]
2026-10-28  5:12 ` [PATCH 3/5] wifi: ath11k: validate DMA ring capability TLVs Jiale Yao
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-3-yaojiale02@163.com \
    --to=yaojiale02@163.com \
    --cc=ath11k@lists.infradead.org \
    --cc=jjohnson@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_gsamin@quicinc.com \
    --cc=quic_mkenna@quicinc.com \
    --cc=rmanohar@codeaurora.org \
    --cc=sriram.ramachandran@oss.qualcomm.com \
    --cc=stable@vger.kernel.org \
    --cc=sven@narfation.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®