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, 3 Nov 2021 18:20:28 +0100
From:   Christoph Hellwig <hch@....de>
To:     Tadeusz Struk <tadeusz.struk@...aro.org>
Cc:     Christoph Hellwig <hch@....de>,
        Bart Van Assche <bvanassche@....org>,
        linux-scsi@...r.kernel.org,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Douglas Gilbert <dgilbert@...erlog.com>
Subject: Re: [PATCH v2 1/2] scsi: scsi_ioctl: Validate command size

On Wed, Nov 03, 2021 at 10:19:21AM -0700, Tadeusz Struk wrote:
> On 11/3/21 10:09, Christoph Hellwig wrote:
>>> +	if (hdr->cmd_len < 6)
>>> +		return -EMSGSIZE;
>> The checks looks good, but I'd be tempted to place it next to the
>> other check on hdr->cmd_len in the caller.
>
> Do you mean in sg_io()?
> I don't mind changing it, but putting the check here in
> scsi_fill_sghdr_rq() was suggested by Douglas (cc'ed now).

Ok, let's keep it that way for now.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ