public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Juerg Haefliger <juerg.haefliger@canonical.com>
To: Kalle Valo <kvalo@kernel.org>
Cc: aspriel@gmail.com, franky.lin@broadcom.com,
	hante.meuleman@broadcom.com, linux-wireless@vger.kernel.org,
	brcm80211-dev-list.pdl@broadcom.com,
	SHA-cyfmac-dev-list@infineon.com, linux-kernel@vger.kernel.org,
	linus.walleij@linaro.org, marcan@marcan.st,
	keescook@chromium.org, gustavoars@kernel.org,
	hdegoede@redhat.com, ryohei.kondo@cypress.com
Subject: Re: [PATCH] wifi: brcmfmac: Replace 1-element arrays with flexible arrays
Date: Wed, 13 Sep 2023 11:17:47 +0200	[thread overview]
Message-ID: <20230913111747.35839fd8@gollum> (raw)
In-Reply-To: <87msxqlaao.fsf@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

On Wed, 13 Sep 2023 11:58:07 +0300
Kalle Valo <kvalo@kernel.org> wrote:

> Juerg Haefliger <juerg.haefliger@canonical.com> writes:
> 
> > Since commit 2d47c6956ab3 ("ubsan: Tighten UBSAN_BOUNDS on GCC"),
> > UBSAN_BOUNDS no longer pretends 1-element arrays are unbounded. Walking
> > 'element' and 'channel_list' will trigger warnings, so make them proper
> > flexible arrays.
> >
> > False positive warnings were:
> >
> >   UBSAN: array-index-out-of-bounds in drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:6984:20
> >   index 1 is out of range for type '__le32 [1]'
> >
> >   UBSAN: array-index-out-of-bounds in drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1126:27
> >   index 1 is out of range for type '__le16 [1]'
> >
> > for these lines of code:
> >
> >   6884  ch.chspec = (u16)le32_to_cpu(list->element[i]);
> >
> >   1126  params_le->channel_list[i] = cpu_to_le16(chanspec);
> >
> > Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>  
> 
> Should this be queued for v6.6?

I would think so. It's a problem since 6.5. Which reminds me that I should
have added:

Cc: stable@vger.kernel.org # 6.5+

...Juerg



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-09-13  9:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13  6:54 [PATCH] wifi: brcmfmac: Replace 1-element arrays with flexible arrays Juerg Haefliger
2023-09-13  8:58 ` Kalle Valo
2023-09-13  9:17   ` Juerg Haefliger [this message]
2023-09-13 11:01     ` Kalle Valo
2023-09-13  9:28 ` Linus Walleij
2023-09-13 16:02 ` Gustavo A. R. Silva
2023-09-14  6:53   ` Juerg Haefliger
2023-09-14  7:02 ` [PATCH v2] " Juerg Haefliger
2023-09-14 16:52   ` Kees Cook
2023-09-14 17:19   ` Gustavo A. R. Silva
2023-09-18 13:20   ` Kalle Valo

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=20230913111747.35839fd8@gollum \
    --to=juerg.haefliger@canonical.com \
    --cc=SHA-cyfmac-dev-list@infineon.com \
    --cc=aspriel@gmail.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=franky.lin@broadcom.com \
    --cc=gustavoars@kernel.org \
    --cc=hante.meuleman@broadcom.com \
    --cc=hdegoede@redhat.com \
    --cc=keescook@chromium.org \
    --cc=kvalo@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=ryohei.kondo@cypress.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