lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202309140952.98489A964@keescook>
Date:   Thu, 14 Sep 2023 09:52:38 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Juerg Haefliger <juerg.haefliger@...onical.com>
Cc:     SHA-cyfmac-dev-list@...ineon.com, aspriel@...il.com,
        brcm80211-dev-list.pdl@...adcom.com, franky.lin@...adcom.com,
        gustavoars@...nel.org, hante.meuleman@...adcom.com,
        hdegoede@...hat.com, kvalo@...nel.org, linus.walleij@...aro.org,
        linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
        marcan@...can.st, ryohei.kondo@...ress.com, stable@...r.kernel.org
Subject: Re: [PATCH v2] wifi: brcmfmac: Replace 1-element arrays with
 flexible arrays

On Thu, Sep 14, 2023 at 09:02:27AM +0200, Juerg Haefliger wrote:
> 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);
> 
> Cc: stable@...r.kernel.org # 6.5+
> Signed-off-by: Juerg Haefliger <juerg.haefliger@...onical.com>

Reviewed-by: Kees Cook <keescook@...omium.org>

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ