From: Tejun Heo <tj@kernel.org>
To: Eric Biggers <ebiggers3@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
syzkaller-bugs@googlegroups.com,
Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH] libata: remove WARN() for DMA or PIO command without data
Date: Mon, 12 Feb 2018 09:21:00 -0800 [thread overview]
Message-ID: <20180212172100.GC695913@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20180204043327.16760-1-ebiggers3@gmail.com>
On Sat, Feb 03, 2018 at 08:33:27PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> 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@syzkaller.appspotmail.com
> Cc: <stable@vger.kernel.org> # v2.6.25+
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied to libata/for-4.16-fixes.
Thanks.
--
tejun
prev parent reply other threads:[~2018-02-12 17:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 8:19 WARNING in ata_qc_issue syzbot
2017-10-27 8:20 ` Dmitry Vyukov
2017-10-30 15:23 ` Tejun Heo
2018-02-04 4:33 ` [PATCH] libata: remove WARN() for DMA or PIO command without data Eric Biggers
2018-02-12 17:21 ` Tejun Heo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180212172100.GC695913@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=ebiggers3@gmail.com \
--cc=ebiggers@google.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.