From: Zhao Li <enderaoelyther@gmail.com>
To: Francesco Dolcini <francesco@dolcini.it>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Johannes Berg <johannes@sipsolutions.net>,
Brian Norris <briannorris@chromium.org>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] wifi: mwifiex: validate action frame fixed fields
Date: Fri, 24 Jul 2026 04:22:39 +0800 [thread overview]
Message-ID: <20260723202239.158-1-enderaoelyther@gmail.com> (raw)
In-Reply-To: <20260723144127.GA234631@francesco-nb>
On Thu, 23 Jul 2026 at 16:41:27 +0200, Francesco Dolcini wrote:
> I am confused, why is this check needed here, and not done in
> mwifiex_process_mgmt_packet()?
I double-checked the arithmetic and, yes, I made a mistake. The header
check is redundant while the other two checks are needed.
mwifiex_process_mgmt_packet() already validates:
if (pkt_len < sizeof(struct ieee80211_hdr) + sizeof(pkt_len)) {
After subtracting sizeof(pkt_len), the len passed into
mwifiex_parse_mgmt_packet() is at least sizeof(struct ieee80211_hdr).
So the if (len < sizeof(*ieee_hdr)) guard is redundant.
The remaining two guards check that the category and action_code bytes
are present beyond the header. Keeping these subtype-specific checks in
the parser places them next to the corresponding reads.
I will drop the redundant header check and resend as v3.
Thanks,
Zhao
next prev parent reply other threads:[~2026-07-23 20:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 1:10 [PATCH v2] wifi: mwifiex: validate action frame fixed fields Zhao Li
2026-07-23 14:41 ` Francesco Dolcini
2026-07-23 20:22 ` Zhao Li [this message]
2026-07-23 20:22 ` [PATCH v3] " Zhao Li
2026-08-11 21:40 ` Brian Norris
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=20260723202239.158-1-enderaoelyther@gmail.com \
--to=enderaoelyther@gmail.com \
--cc=briannorris@chromium.org \
--cc=francesco@dolcini.it \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--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 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.