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:   Wed, 18 Jan 2023 19:23:34 -0500
From:   "Martin K. Petersen" <martin.petersen@...cle.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     "Martin K . Petersen" <martin.petersen@...cle.com>,
        Dan Williams <dan.j.williams@...el.com>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        kernel test robot <lkp@...el.com>,
        linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] scsi: uapi: Replace 0-length array with flexible array

On Thu, 05 Jan 2023 15:30:46 -0800, Kees Cook wrote:

> Zero-length arrays are deprecated[1]. Replace struct
> fc_bsg_host_vendor_reply's "vendor_rsp" 0-length array with a flexible
> array. Detected with GCC 13, using -fstrict-flex-arrays=3:
> 
> drivers/scsi/qla2xxx/qla_isr.c: In function 'qla25xx_process_bidir_status_iocb.isra':
> drivers/scsi/qla2xxx/qla_isr.c:3117:54: warning: array subscript 0 is outside array bounds of '__u32[0]' {aka 'unsigned int[]'} [-Warray-bounds=]
>  3117 |         bsg_reply->reply_data.vendor_reply.vendor_rsp[0] = rval;
>       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
> In file included from drivers/scsi/qla2xxx/qla_def.h:34,
>                  from drivers/scsi/qla2xxx/qla_isr.c:6:
> include/uapi/scsi/scsi_bsg_fc.h:219:15: note: while referencing 'vendor_rsp'
>   219 |         __u32 vendor_rsp[0];
>       |               ^~~~~~~~~~
> 
> [...]

Applied to 6.3/scsi-queue, thanks!

[1/1] scsi: uapi: Replace 0-length array with flexible array
      https://git.kernel.org/mkp/scsi/c/64b6deadc938

-- 
Martin K. Petersen	Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ