linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: syzbot <syzbot+ded1794a717e3b235226@syzkaller.appspotmail.com>
Cc: andreyknvl@google.com, <linux-kernel@vger.kernel.org>,
	<linux-usb@vger.kernel.org>, <syzkaller-bugs@googlegroups.com>
Subject: Re: KASAN: use-after-free Read in hidraw_ioctl
Date: Wed, 21 Aug 2019 12:19:45 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1908211218550.1816-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <00000000000027b5750590a087dc@google.com>

#syz test: https://github.com/google/kasan.git e96407b4

Index: usb-devel/drivers/hid/hidraw.c
===================================================================
--- usb-devel.orig/drivers/hid/hidraw.c
+++ usb-devel/drivers/hid/hidraw.c
@@ -370,7 +370,7 @@ static long hidraw_ioctl(struct file *fi
 
 	mutex_lock(&minors_lock);
 	dev = hidraw_table[minor];
-	if (!dev) {
+	if (!dev || !dev->exist) {
 		ret = -ENODEV;
 		goto out;
 	}


  parent reply	other threads:[~2019-08-21 16:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 12:48 KASAN: use-after-free Read in hidraw_ioctl syzbot
2019-08-21 12:54 ` Andrey Konovalov
2019-08-21 12:54   ` syzbot
2019-08-21 12:54   ` syzbot
2019-08-21 12:55   ` Andrey Konovalov
2019-08-21 13:27     ` syzbot
2019-08-21 14:10       ` Andrey Konovalov
2019-08-21 16:19       ` Alan Stern [this message]
2019-08-21 16:38         ` syzbot
2019-08-21 16:39           ` Andrey Konovalov

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=Pine.LNX.4.44L0.1908211218550.1816-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=andreyknvl@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=syzbot+ded1794a717e3b235226@syzkaller.appspotmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).