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, 19 Jan 2023 09:46:50 +0000
From:   "G, GurucharanX" <gurucharanx.g@...el.com>
To:     Kees Cook <keescook@...omium.org>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>
CC:     "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
        "linux-hardening@...r.kernel.org" <linux-hardening@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "David S. Miller" <davem@...emloft.net>
Subject: RE: [Intel-wired-lan] [PATCH] net/i40e: Replace 0-length array with
 flexible array



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Kees Cook
> Sent: Friday, January 6, 2023 5:16 AM
> To: Brandeburg, Jesse <jesse.brandeburg@...el.com>
> Cc: Kees Cook <keescook@...omium.org>; intel-wired-lan@...ts.osuosl.org;
> Gustavo A. R. Silva <gustavoars@...nel.org>; linux-kernel@...r.kernel.org;
> Eric Dumazet <edumazet@...gle.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; linux-hardening@...r.kernel.org;
> netdev@...r.kernel.org; Jakub Kicinski <kuba@...nel.org>; Paolo Abeni
> <pabeni@...hat.com>; David S. Miller <davem@...emloft.net>
> Subject: [Intel-wired-lan] [PATCH] net/i40e: Replace 0-length array with
> flexible array
> 
> Zero-length arrays are deprecated[1]. Replace struct i40e_lump_tracking's
> "list" 0-length array with a flexible array. Detected with GCC 13, using -fstrict-
> flex-arrays=3:
> 
> In function 'i40e_put_lump',
>     inlined from 'i40e_clear_interrupt_scheme' at
> drivers/net/ethernet/intel/i40e/i40e_main.c:5145:2:
> drivers/net/ethernet/intel/i40e/i40e_main.c:278:27: warning: array subscript
> <unknown> is outside array bounds of 'u16[0]' {aka 'short unsigned int[]'} [-
> Warray-bounds=]
>   278 |                 pile->list[i] = 0;
>       |                 ~~~~~~~~~~^~~
> drivers/net/ethernet/intel/i40e/i40e.h: In function
> 'i40e_clear_interrupt_scheme':
> drivers/net/ethernet/intel/i40e/i40e.h:179:13: note: while referencing 'list'
>   179 |         u16 list[0];
>       |             ^~~~
> 
> [1]
> https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-
> length-and-one-element-arrays
> 
> Cc: Jesse Brandeburg <jesse.brandeburg@...el.com>
> Cc: Tony Nguyen <anthony.l.nguyen@...el.com>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: Paolo Abeni <pabeni@...hat.com>
> Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>
> Cc: intel-wired-lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Tested-by: Gurucharan G <gurucharanx.g@...el.com> (A Contingent worker at Intel)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ