Re: [PATCH v2 1/2] scsi: scsi_ioctl: Validate command size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).

--
Thanks,
Tadeusz



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux