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]
Date:   Wed, 08 Jun 2022 17:39:36 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        David Howells <dhowells@...hat.com>
CC:     Sven Schnelle <svens@...ux.ibm.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] s390: disable -Warray-bounds



On June 8, 2022 4:59:29 PM PDT, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>On Wed, Jun 8, 2022 at 2:33 PM Kees Cook <keescook@...omium.org> wrote:
>>
>> I and others have been working through a bunch of them, though yes,
>> they're not all fixed yet. I've been trying to track it here[1], but
>> many of those fixes are only in -next.
>
>Hmm. Even with that disabled, I get a few warnings I *really* would
>want to get rid of.

Yup! :)

>
>The one in ipuv3-crtc.c seems valid about "address used as boolean is
>always true".
>
>The 'dangling-pointer' warning does seem interesting, but not when the
>compiler does as bad a job as gcc seems to do.
>
>See the attached patch for
>
> (a) make the s390 "use -Wno-array-bounds for gcc-12" be generic
>
> (b) fix the ipuv3-crtc.c one. IMX people?
>
> (c) disable -Wdangling-pointer entirely for now

I'll take a look; thanks! Should I send them back as a pull request?

>but that still leaves the netfs_i_context games, which gcc-12 is very
>unhappy about:

Yeah. Happily, this has already been solved, but it looks like David didn't do a pull yet for it?

https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=fscache-next


>I'd like to use something more surgical than
>CONFIG_CC_NO_ARRAY_BOUNDS, but considering the s390 issues, it may not
>even be worth it. Kees, just how far away are we from that being ok on
>x86-64?

For gcc's UBSAN_SHIFT (I typoed this in my first reply) bug, netdev has been moving it to W=1 builds on a per-source basis for the moment:

https://git.kernel.org/linus/e95032988053c17baf6c7e27024f5103a19a5f4a

Some discussion:
https://lore.kernel.org/lkml/202205231229.CF6B8471@keescook/

Perhaps these could be even more carefully limited to GCC 12 only, using the Kconfig you suggested?

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ