Re: [PATCH v2] scsi: core: fix uninit-value access of variable sshdr

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

 



On 2019/10/12 10:06, James Bottomley wrote:
> On Sat, 2019-10-12 at 10:03 +0800, zhengbin (A) wrote:
>> On 2019/10/12 9:58, James Bottomley wrote:
>>> On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote:
>>>> BTW: we can't just init sshdr->response_code, sr_do_ioctl use
>>>> sshdr->sense_key
>>> That's an actual bug, isn't it?
>> If we init sshdr in __scsi_execute, this will be ok
> No I mean it's a bug because sr_do_ioctl shouldn't be acting on sense
> that isn't valid.  So all uses of sshdr should be gated on a validity
> check.

Yes you are right, the right way is use scsi_sense_valid(&sshdr), I have troubleshoot callers,

this is the only wrong use(Maybe I miss some...).

>
> James
>
>
> .
>




[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