From: Arend Van Spriel <aspriel@gmail.com>
To: Dokyung Song <dokyung.song@gmail.com>, linux-wireless@vger.kernel.org
Cc: Jisoo Jang <jisoo.jang@yonsei.ac.kr>,
Minsuk Kang <linuxlovemin@yonsei.ac.kr>
Subject: Re: [PATCH] brcmfmac: Fixes potential buffer overflow in 'brcmf_fweh_event_worker'
Date: Thu, 20 Oct 2022 10:41:34 +0200 [thread overview]
Message-ID: <e3e67383-6f34-825b-8a2c-1c6decc44576@gmail.com> (raw)
In-Reply-To: <649de84e-6f9a-5c6b-9a94-a7c6462abd1f@gmail.com>
On 10/20/2022 10:39 AM, Arend Van Spriel wrote:
>> - else
>> + } else {
>> + if (emsg.bsscfgidx >= BRCMF_MAX_IFS) {
>> + bphy_err(drvr, "invalid bsscfg index: %u\n",
>> emsg.bsscfgidx);
>> + goto event_free;
>> + }
>
> probably better to do the validation before any other handling. So right
> after converting the event message at line 245
>
> https://elixir.bootlin.com/linux/latest/source/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c#L245
Actually, if we ignore the event message we can avoid the whole
conversion as well doing the validation before the convert.
Regards,
Arend
prev parent reply other threads:[~2022-10-20 8:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 1:49 [PATCH] brcmfmac: Fixes potential buffer overflow in 'brcmf_fweh_event_worker' Dokyung Song
2022-10-20 8:39 ` Arend Van Spriel
2022-10-20 8:41 ` Arend Van Spriel [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=e3e67383-6f34-825b-8a2c-1c6decc44576@gmail.com \
--to=aspriel@gmail.com \
--cc=dokyung.song@gmail.com \
--cc=jisoo.jang@yonsei.ac.kr \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxlovemin@yonsei.ac.kr \
/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