From: Brian Norris <briannorris@chromium.org>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Jeff Chen <chunfan.chen@gmail.com>,
Jeff Chen <jeff.chen_1@nxp.com>,
Francesco Dolcini <francesco@dolcini.it>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Francesco Dolcini <francesco.dolcini@toradex.com>
Subject: Re: [PATCH v4] wifi: mwifiex: validate event lengths before copying bodies
Date: Tue, 11 Aug 2026 14:37:56 -0700 [thread overview]
Message-ID: <anuWNJn3BnZDsrxB@google.com> (raw)
In-Reply-To: <20260731141600.2-mwifiex-v4-pengpeng@iscas.ac.cn>
On Fri, Jul 31, 2026 at 10:20:02PM +0800, Pengpeng Hou wrote:
> mwifiex event packets contain a four-byte event cause followed by the
> event body. The USB and SDIO paths copy from data after that header using
> the full packet length, so the source range extends four bytes beyond the
> skb. The SDIO path also reads the event cause before validating the
> packet and publishes oversized events without a copied body.
>
> Reject SDIO events that are shorter than the header or whose body exceeds
> the event buffer. Discard them through the same free-and-break contract
> used for unknown upload types. Retain USB's existing error path, apply the
> same body-length upper bound there, and copy only the bytes after the event
> header in both paths.
>
> Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Acked-by: Brian Norris <briannorris@chromium.org>
prev parent reply other threads:[~2026-08-11 21:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 14:20 [PATCH v4] wifi: mwifiex: validate event lengths before copying bodies Pengpeng Hou
2026-08-04 7:32 ` Jeff Chen
2026-08-11 21:37 ` Brian Norris [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=anuWNJn3BnZDsrxB@google.com \
--to=briannorris@chromium.org \
--cc=chunfan.chen@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=francesco@dolcini.it \
--cc=jeff.chen_1@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.