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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 11 Jul 2021 18:16:49 +0300
From:   Sakari Ailus <sakari.ailus@...ux.intel.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Martiros Shakhzadyan <vrzh@...h.net>,
        linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
        linux-staging@...ts.linux.dev, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] media: atomisp: Perform a single memset() for union

On Sun, Jul 11, 2021 at 07:51:01AM -0700, Kees Cook wrote:
> There is no need to memset() both dvs_grid_info and dvs_stat_grid_info
> separately: they are part of the same union. Instead, just zero the
> union itself. This additionally avoids a false positive (due to a
> gcc optimization bug[1]) when building with the coming FORTIFY_SOURCE
> improvements:
> 
> In function 'fortify_memset_chk',
>     inlined from 'sh_css_pipe_get_grid_info' at drivers/staging/media/atomisp/pci/sh_css.c:5186:3,
>     inlined from 'ia_css_stream_create' at drivers/staging/media/atomisp/pci/sh_css.c:9442:10:
> ./include/linux/fortify-string.h:199:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning]
>   199 |    __write_overflow_field();
>       |    ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101419
> 
> Signed-off-by: Kees Cook <keescook@...omium.org>

Acked-by: Sakari Ailus <sakari.ailus@...ux.intel.com>

-- 
Sakari Ailus

Powered by blists - more mailing lists