From: Jakub Kicinski <kuba@kernel.org>
To: pinkperfect <pinkperfect2021@gmail.com>
Cc: amitkarwar@gmail.com, kvalo@kernel.org,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wifi: mwifiex: Fix integer underflow in mwifiex_process_mgmt_packet
Date: Wed, 12 Jul 2023 17:51:02 -0700 [thread overview]
Message-ID: <20230712175102.59d2bda9@kernel.org> (raw)
In-Reply-To: <20230705044350.838428-1-pinkperfect2021@gmail.com>
On Wed, 5 Jul 2023 04:43:50 +0000 pinkperfect wrote:
> In outside functions have checked upper limit of rx_pkt_length,
> in mwifiex_process_mgmt_packet should make sure rx_pkt_length not underflow
> to avoid OOB access.
Please add a Fixes tag.
> Signed-off-by: pinkperfect <pinkperfect2021@gmail.com>
We need something close to your legal name, or basically know who you
are. Because of developer certificate of origin. We're working on real
code under real copyright law..
> diff --git a/drivers/net/wireless/marvell/mwifiex/util.c b/drivers/net/wireless/marvell/mwifiex/util.c
> index 94c2d219835d..4291252e06ea 100644
> --- a/drivers/net/wireless/marvell/mwifiex/util.c
> +++ b/drivers/net/wireless/marvell/mwifiex/util.c
> @@ -399,6 +399,11 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv,
>
> pkt_len = le16_to_cpu(rx_pd->rx_pkt_length);
>
> + if (pkt_len < sizeof(struct ieee80211_hdr)) {
The callers also look at the header and the MAC addresses in it.
I think we need to pull this check earlier.
> + mwifiex_dbg(priv->adapter, ERROR, "invalid rx_pkt_length");
> + return -1;
prev parent reply other threads:[~2023-07-13 0:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 4:43 [PATCH] wifi: mwifiex: Fix integer underflow in mwifiex_process_mgmt_packet pinkperfect
2023-07-13 0:51 ` Jakub Kicinski [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=20230712175102.59d2bda9@kernel.org \
--to=kuba@kernel.org \
--cc=amitkarwar@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pinkperfect2021@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).