Re: [PATCH] libata: remove WARN() for DMA or PIO command without data

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

 



On Sat, Feb 03, 2018 at 08:33:27PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> syzkaller hit a WARN() in ata_qc_issue() when writing to /dev/sg0.  This
> happened because it issued a READ_6 command with no data buffer.
> 
> Just remove the WARN(), as it doesn't appear indicate a kernel bug.  The
> expected behavior is to fail the command, which the code does.
> 
> Here's a reproducer that works in QEMU when /dev/sg0 refers to a disk of
> the default type ("82371SB PIIX3 IDE"):
> 
>     #include <fcntl.h>
>     #include <unistd.h>
> 
>     int main()
>     {
>             char buf[42] = { [36] = 0x8 /* READ_6 */ };
> 
>             write(open("/dev/sg0", O_RDWR), buf, sizeof(buf));
>     }
> 
> Fixes: f92a26365a72 ("libata: change ATA_QCFLAG_DMAMAP semantics")
> Reported-by: syzbot+f7b556d1766502a69d85071d2ff08bd87be53d0f@xxxxxxxxxxxxxxxxxxxxxxxxx
> Cc: <stable@xxxxxxxxxxxxxxx> # v2.6.25+
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>

Applied to libata/for-4.16-fixes.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux