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:   Mon, 20 Sep 2021 18:17:46 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     Arnd Bergmann <arnd@...db.de>, Kees Cook <keescook@...omium.org>,
        Tejun Heo <tj@...nel.org>,
        linux-block <linux-block@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [RFC] blk-iocost stringop-overread warning workaround

On Mon, Sep 20, 2021 at 3:15 PM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> In some randconfig builds with gcc-11, I get a warning from
> the fortified string helpers:
>
> In function 'memcpy',
>     inlined from 'ioc_cost_model_write' at block/blk-iocost.c:3345:2:
> include/linux/fortify-string.h:20:33: error: '__builtin_memcpy' reading 48 bytes from a region of size 0 [-Werror=stringop-overread]
>    20 | #define __underlying_memcpy     __builtin_memcpy
>       |                                 ^
> include/linux/fortify-string.h:191:16: note: in expansion of macro '__underlying_memcpy'
>   191 |         return __underlying_memcpy(p, q, size);
>       |                ^~~~~~~~~~~~~~~~~~~
>
> I don't see anything wrong in the code itself, so I suspect it's
> gcc doing something weird again. The only way I could find to make
> this warning go away is to hide the object using the RELOC_HIDE()
> macro, but this is really ugly and I hope someone has a better
> idea.
>
> Cc: Kees Cook <keescook@...omium.org>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Please disregard my patch for now. After looking closer, I found that I had
applied a patch that accidentally removed the

KBUILD_CFLAGS  += -fno-delete-null-pointer-checks

line from the top-level Makefile. If I put that line back, the warning
disappears.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ