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] [day] [month] [year] [list]
Date:   Thu, 17 Nov 2022 20:23:06 -0800
From:   Kees Cook <keescook@...omium.org>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc:     Clemens Ladisch <clemens@...isch.de>, linux-kernel@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH] hpet: Replace one-element array with flexible-array
 member

On Thu, Nov 17, 2022 at 09:54:04PM -0600, Gustavo A. R. Silva wrote:
> On Thu, Nov 17, 2022 at 07:42:55PM -0800, Kees Cook wrote:
> > One-element arrays are deprecated[1] and are being replaced with
> > flexible array members in support of the ongoing efforts to tighten the
> > FORTIFY_SOURCE routines on memcpy(), correctly instrument array indexing
> > with UBSAN_BOUNDS, and to globally enable -fstrict-flex-arrays=3.
> > 
> > Replace one-element array with flexible-array member in struct hpet.
> > 
> > This results in no differences in binary output. The use of struct hpet
> > is never used with sizeof() and accesses via hpet_timers array are
> > already done after explicit bounds checking.
> > 
> > [1] https://github.com/KSPP/linux/issues/79
> > 
> > Cc: Clemens Ladisch <clemens@...isch.de>
> > Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>
> > Signed-off-by: Kees Cook <keescook@...omium.org>
> 
> Such a sneaky 1-element... ~.~

Yes! This one made my system unbootable after adding
-fstrict-flex-arrays=3. :) All better now.

> Reviewed-by: Gustavo A. R. Silva <gustavoars@...nel.org>

Thanks!

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ