Files
linux/drivers/hid
Rodrigo Rivas Costa 7c3a5626fd HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device
commit a955358d54 upstream.

Doing `ioctl(HIDIOCGFEATURE)` in a tight loop on a hidraw device
and then disconnecting the device, or unloading the driver, can
cause a NULL pointer dereference.

When a hidraw device is destroyed it sets 0 to `dev->exist`.
Most functions check 'dev->exist' before doing its work, but
`hidraw_get_report()` was missing that check.

Cc: stable@vger.kernel.org
Signed-off-by: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-24 09:32:10 +02:00
..
2017-10-18 09:20:41 +02:00
2015-10-21 13:15:53 +02:00
2013-01-03 10:27:31 +01:00
2014-08-21 10:43:28 -05:00
2018-04-24 09:32:07 +02:00
2015-10-21 13:15:53 +02:00
2018-03-22 09:23:27 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-04-24 16:32:27 +02:00
2018-04-24 09:32:07 +02:00
2013-01-03 10:27:31 +01:00
2015-11-06 21:18:06 +01:00
2018-04-24 09:32:07 +02:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2015-10-21 13:15:53 +02:00
2018-04-24 09:32:07 +02:00
2014-06-27 00:33:44 +02:00
2013-01-03 10:27:31 +01:00
2015-05-07 10:47:53 +02:00
2014-08-21 10:43:28 -05:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00