Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1604190

Re: [PATCH] scsi: sr: fix oob access in get_capabilities

From Kefeng Wang <wangkefeng.wang@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH] scsi: sr: fix oob access in get_capabilities
Date 2017-03-20 07:10 +0100
Message-ID <tmYFY-yg-11@gated-at.bofh.it> (permalink)
References <tgSDg-8hC-11@gated-at.bofh.it> <tlr9o-6R3-9@gated-at.bofh.it> <tlw93-1WG-13@gated-at.bofh.it> <tmaSR-6Db-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 2017/3/18 7:29, Martin K. Petersen wrote:
> Kefeng Wang <wangkefeng.wang@huawei.com> writes:
> 
> Kefeng,
> 
>> root@localhost ~]# sg_modes -p 0x2a /dev/sr0
>>     QEMU      QEMU DVD-ROM      0.15   peripheral_type: cd/dvd [0x5]
>> Mode parameter header from MODE SENSE(10):
>> Invalid block descriptor length=512, ignore
>>   Mode data length=36, medium type=0x70, specific param=0x00, longlba=0
>>   Block descriptor length=0
>>>> MM capabilities and mechanical status (obsolete), page_control: current
>>  00     2a 12 00 00 71 60 29 00  02 c2 00 02 02 00 02 c2
>>  10     00 00 00 00
>> Unexpectedly received extra mode page responses, ignore
> 
> That looks pretty broken.
> 
> Could you try the following patch?

The issue still exists, the patch return zero in scsi_mode_sense(), but zero means
SAM_STAT_GOOD in scsi_status_is_good(), so n will be still bigger than 512;

Thanks,

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] scsi: sr: fix oob access in get_capabilities "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-03-16 01:10 +0100
  Re: [PATCH] scsi: sr: fix oob access in get_capabilities Kefeng Wang <wangkefeng.wang@huawei.com> - 2017-03-16 06:30 +0100
    Re: [PATCH] scsi: sr: fix oob access in get_capabilities "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-03-18 02:00 +0100
      Re: [PATCH] scsi: sr: fix oob access in get_capabilities Kefeng Wang <wangkefeng.wang@huawei.com> - 2017-03-20 07:10 +0100
        Re: [PATCH] scsi: sr: fix oob access in get_capabilities "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-03-20 15:30 +0100
          Re: [PATCH] scsi: sr: fix oob access in get_capabilities Kefeng Wang <wangkefeng.wang@huawei.com> - 2017-03-21 03:40 +0100

csiph-web