HID: hidraw, fix a NULL pointer dereference in hidraw_ioctl
authorAntonio Ospite <ospite@studenti.unina.it>
Tue, 5 Oct 2010 15:20:16 +0000 (17:20 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:27:05 +0000 (13:27 -0800)
commit7cbf7431e259aa462db37fbefc146fbf2a416805
tree4bc34fe2a25aad3346c777cfa73bd4548d76e486
parent4db5de7adfe16721d77b7658c383f65372f1560f
HID: hidraw, fix a NULL pointer dereference in hidraw_ioctl

commit d20d5ffab92f00188f360c44c791a5ffb988247c upstream.

BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
IP: [<ffffffffa02c66b4>] hidraw_ioctl+0xfc/0x32c [hid]
[...]

This is reproducible by disconnecting the device while userspace does
ioctl in a loop and doesn't check return values in order to exit the
loop.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hid/hidraw.c