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]
Message-Id: <164489513313.15031.7832986884338779882.b4-ty@oracle.com>
Date:   Mon, 14 Feb 2022 22:19:18 -0500
From:   "Martin K. Petersen" <martin.petersen@...cle.com>
To:     Kees Cook <keescook@...omium.org>,
        Michael Cyr <mikecyr@...ux.ibm.com>
Cc:     "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        linux-hardening@...r.kernel.org, target-devel@...r.kernel.org,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Tyrel Datwyler <tyreld@...ux.ibm.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: ibmvscsis: Silence -Warray-bounds warning

On Mon, 7 Feb 2022 22:12:31 -0800, Kees Cook wrote:

> Instead of doing a cast to storage that is too small, add a union for
> the high 64 bits. Silences the warnings under -Warray-bounds:
> 
> drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c: In function 'ibmvscsis_send_messages':
> drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1934:44: error: array subscript 'struct viosrp_crq[0]' is partly outside array bounds of 'u64[1]' {aka 'long long unsigned int[1]'} [-Werror=array-bounds]
>  1934 |                                         crq->valid = VALID_CMD_RESP_EL;
>       |                                            ^~
> drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1875:13: note: while referencing 'msg_hi'
>  1875 |         u64 msg_hi = 0;
>       |             ^~~~~~
> 
> [...]

Applied to 5.18/scsi-queue, thanks!

[1/1] scsi: ibmvscsis: Silence -Warray-bounds warning
      https://git.kernel.org/mkp/scsi/c/03e4383c7ce3

-- 
Martin K. Petersen	Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ