[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.2004182158020.26218-100000@netrider.rowland.org>
Date: Sat, 18 Apr 2020 22:16:32 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Julian Squires <julian@...ht.net>,
Hans de Goede <hdegoede@...hat.com>,
Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
syzbot <syzbot+7bf5a7b0f0a1f9446f4c@...kaller.appspotmail.com>
cc: linux-input@...r.kernel.org, <andreyknvl@...gle.com>,
<gregkh@...uxfoundation.org>, <ingrassia@...genesys.com>,
Kernel development list <linux-kernel@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
<syzkaller-bugs@...glegroups.com>
Subject: Re: KASAN: use-after-free Read in usbhid_close (3)
linux-input people:
syzbot has found a bug related to USB/HID/input, and I have narrowed it
down to the wacom driver. As far as I can tell, the problem is caused
the fact that drivers/hid/wacom_sys.c calls input_register_device()
in several places, but it never calls input_unregister_device().
I know very little about the input subsystem, but this certainly seems
like a bug.
When the device is unplugged, the disconnect pathway doesn't call
hid_hw_close(). That routine doesn't get called until the user closes
the device file (which can be long after the device is gone and
hid_hw_stop() has run). Then usbhid_close() gets a use-after-free
error when it tries to access data structures that were deallocated by
usbhid_stop(). No doubt there are other problems too, but this is
the one that syzbot found.
Can any of you help fix this? Thanks.
Alan Stern
Powered by blists - more mailing lists