Files
linux/drivers
Rodrigo Rivas Costa 7c3a5626fd HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device
commit a955358d54695e4ad9f7d6489a7ac4d69a8fc711 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-12-16 10:33:55 +01:00
2018-02-25 11:03:46 +01:00
2018-03-24 10:58:41 +01:00
2018-02-25 11:03:51 +01:00
2018-04-13 19:50:16 +02:00
2018-04-24 09:32:05 +02:00