android_kernel_samsung_a7y1.../drivers/hid
dan.carpenter@oracle.com 208119d552 HID: hiddev: Fix race in in hiddev_disconnect()
commit 5c02c447eaeda29d3da121a2e17b97ccaf579b51 upstream.

Syzbot reports that "hiddev" is used after it's free in hiddev_disconnect().
The hiddev_disconnect() function sets "hiddev->exist = 0;" so
hiddev_release() can free it as soon as we drop the "existancelock"
lock.  This patch moves the mutex_unlock(&hiddev->existancelock) until
after we have finished using it.

Reported-by: syzbot+784ccb935f9900cc7c9e@syzkaller.appspotmail.com
Fixes: 7f77897ef2b6 ("HID: hiddev: fix potential use-after-free")
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 14:04:49 +02:00
..
i2c-hid A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usbhid HID: hiddev: Fix race in in hiddev_disconnect() 2020-04-07 14:04:49 +02:00
hid-a4tech.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-apple.c HID: apple: Fix stuck function keys when using FN 2020-04-07 07:43:36 +02:00
hid-appleir.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-aureal.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-axff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-belkin.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-betopff.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-cherry.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-chicony.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-core.c HID: core: fix off-by-one memset in hid_report_raw_event() 2020-04-07 14:04:45 +02:00
hid-corsair.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-cp2112.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-cypress.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-debug.c HID: debug: fix race condition with between rdesc_show() and device removal 2020-04-06 16:42:06 +02:00
hid-dr.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-elecom.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-elo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-emsff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-ezkey.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-gaff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-gembird.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-generic.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-gfrm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-gt683r.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-gyration.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-holtek-kbd.c HID: holtek: test for sanity of intfdata 2020-04-06 20:48:02 +02:00
hid-holtek-mouse.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-holtekff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-hyperv.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-icade.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-ids.h HID: Add quirk for HP X1200 PIXART OEM mouse 2020-04-06 20:28:01 +02:00
hid-input.c HID: hid-input: clear unmapped usages 2020-04-07 13:32:30 +02:00
hid-kensington.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-keytouch.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-kye.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-lcpower.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-lenovo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-lg.c HID: logitech: Fix general protection fault caused by Logitech driver 2020-04-07 07:36:25 +02:00
hid-lg.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-lg2ff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-lg3ff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-lg4ff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-lg4ff.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-lgff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-logitech-dj.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-logitech-hidpp.c HID: logitech-hidpp: use RAP instead of FAP to get the protocol version 2020-04-06 18:18:31 +02:00
hid-madcatz.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-magicmouse.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-microsoft.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-monterey.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-multitouch.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-ntrig.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-ortek.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-ovr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-penmount.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-petalynx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-picolcd_backlight.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-picolcd_cir.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-picolcd_core.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-picolcd_debugfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-picolcd_fb.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-picolcd_lcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-picolcd_leds.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-picolcd.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-pl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-plantronics.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-primax.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-prodikeys.c HID: prodikeys: Fix general protection fault during probe 2020-04-07 07:36:19 +02:00
hid-rmi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-arvo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-arvo.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-common.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-common.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-isku.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-isku.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-kone.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-kone.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-koneplus.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-koneplus.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-konepure.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-kovaplus.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-kovaplus.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-lua.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-lua.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-pyra.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-pyra.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-ryos.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-savu.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat-savu.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-roccat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-saitek.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-samsung.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-sensor-custom.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-sensor-hub.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-sjoy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-sony.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-speedlink.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-steelseries.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-sunplus.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-synaptics-bt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-thingm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-tivo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-tmff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-topseed.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-twinhan.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-uclogic.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-waltop.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-wiimote-core.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-wiimote-debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-wiimote-modules.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-wiimote.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-xinmo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid-zpff.c HID: Fix assumption that devices have inputs 2020-04-07 09:28:20 +02:00
hid-zydacron.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hidraw.c HID: hidraw, uhid: Always report EPOLLOUT 2020-04-07 13:36:12 +02:00
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uhid.c HID: hidraw, uhid: Always report EPOLLOUT 2020-04-07 13:36:12 +02:00
wacom_sys.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wacom_wac.c HID: wacom: correct misreported EKR ring values 2020-04-06 20:53:39 +02:00
wacom_wac.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wacom.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30