lkml.org 
[lkml]   [2021]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2021-11-03 18:21    [W:0.030 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site