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: <9e820a6e-a42e-1098-4044-5b6786ad7b2e@linaro.org>
Date:   Wed, 3 Nov 2021 07:40:50 -0700
From:   Tadeusz Struk <tadeusz.struk@...aro.org>
To:     Bart Van Assche <bvanassche@....org>, linux-scsi@...r.kernel.org
Cc:     Christoph Hellwig <hch@....de>,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 1/2] scsi: scsi_ioctl: Validate command size

On 11/2/21 20:32, Bart Van Assche wrote:
>> +    if (hdr->cmd_len < 6 || hdr->cmd_len > sizeof(req->__cmd))
>> +        return -EMSGSIZE;
> 
> That doesn't look right to me since sg_io() allocates req->cmd if necessary:
> 
>      if (hdr->cmd_len > BLK_MAX_CDB) {
>          req->cmd = kzalloc(hdr->cmd_len, GFP_KERNEL);
>          if (!req->cmd)
>              goto out_put_request;
>      }

I missed that. I will send a v2 soon.

-- 
Thanks,
Tadeusz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ