summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-twinhan.c
diff options
context:
space:
mode:
authorRodrigo Rivas Costa <rodrigorivascosta@gmail.com>2018-04-06 01:09:36 +0200
committerJiri Kosina <jkosina@suse.cz>2018-04-09 09:30:25 +0200
commita955358d54695e4ad9f7d6489a7ac4d69a8fc711 (patch)
tree7c7e5664208ad40c7d51fc2f98bf72358b7abba8 /drivers/hid/hid-twinhan.c
parent2e210bbb7429cdcf1a1a3ad00c1bf98bd9bf2452 (diff)
HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device
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>
Diffstat (limited to 'drivers/hid/hid-twinhan.c')
0 files changed, 0 insertions, 0 deletions