From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wifi: ath9k: validate WMI response length before copying
Date: Wed, 09 Sep 2026 12:51:38 +0200 [thread overview]
Message-ID: <87h5jyg0jp.fsf@toke.dk> (raw)
In-Reply-To: <42e9f2c5-7ba5-4270-91b9-46c41526c065@oss.qualcomm.com>
Jeff Johnson <jeff.johnson@oss.qualcomm.com> writes:
> On 9/4/2026 3:21 AM, Toke Høiland-Jørgensen wrote:
>> Pengpeng Hou <pengpeng@iscas.ac.cn> writes:
>>
>>> ath9k_wmi_rsp_callback() removes the WMI command header from the skb
>>> and then copies wmi->cmd_rsp_len bytes into the waiting response
>>> buffer. The response length is expected by the waiting command path,
>>> while the skb length comes from the device response. A short response
>>> can therefore be read past the end of the skb data.
>>>
>>> Record malformed short responses in the WMI state and return the error
>>> to the waiting command path after completion. This avoids both the
>>> out-of-bounds read and the false-success case where callers would
>>> consume stale response data.
>>>
>>> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
>>
>> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
>
> Can you check the v2: 20260814075837.20005-1-pengpeng@iscas.ac.cn
The code seems to be identical, only the commit message differs, so up
to you which version you want to take :)
-Toke
prev parent reply other threads:[~2026-09-09 10:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-04 1:14 Pengpeng Hou
2026-09-04 10:21 ` Toke Høiland-Jørgensen
2026-09-08 22:22 ` Jeff Johnson
2026-09-09 10:51 ` Toke Høiland-Jørgensen [this message]
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=87h5jyg0jp.fsf@toke.dk \
--to=toke@toke.dk \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pengpeng@iscas.ac.cn \
/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®