WSL2-Linux-Kernel/drivers/hid
Jason Gerecke 179e8e47c0 HID: wacom: Correct NULL dereference on AES pen proximity
The recent commit to fix a memory leak introduced an inadvertant NULL
pointer dereference. The `wacom_wac->pen_fifo` variable was never
intialized, resuling in a crash whenever functions tried to use it.
Since the FIFO is only used by AES pens (to buffer events from pen
proximity until the hardware reports the pen serial number) this would
have been easily overlooked without testing an AES device.

This patch converts `wacom_wac->pen_fifo` over to a pointer (since the
call to `devres_alloc` allocates memory for us) and ensures that we assign
it to point to the allocated and initalized `pen_fifo` before the function
returns.

Link: https://github.com/linuxwacom/input-wacom/issues/230
Fixes: 37309f47e2 ("HID: wacom: Fix memory leakage caused by kfifo_alloc")
CC: stable@vger.kernel.org # v4.19+
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Tested-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-01-26 11:53:53 +01:00
..
amd-sfh-hid HID: sfh: fix address space confusion 2021-01-04 16:08:12 +01:00
i2c-hid Merge branch 'for-5.11/i2c-hid' into for-linus 2020-12-16 11:42:01 +01:00
intel-ish-hid HID: intel-ish-hid: Remove unnecessary assignment to variable rv 2020-11-25 13:56:00 +01:00
usbhid HID: usbhid: Fix fall-through warnings for Clang 2020-11-25 14:01:55 +01:00
Kconfig HID: sony: select CONFIG_CRC32 2021-01-04 16:09:48 +01:00
Makefile SFH: PCIe driver to add support of AMD sensor fusion hub 2020-10-22 12:05:02 +02:00
hid-a4tech.c
hid-accutouch.c
hid-alps.c HID: alps: clean up indentation issue 2020-09-22 11:19:55 +02:00
hid-apple.c HID: apple: Add support for Matias wireless keyboard 2020-08-17 12:17:52 +02:00
hid-appleir.c
hid-asus.c HID: asus: Add support for ASUS N-Key keyboard 2020-10-29 15:54:39 +01:00
hid-aureal.c
hid-axff.c
hid-belkin.c
hid-betopff.c
hid-bigbenff.c
hid-cherry.c
hid-chicony.c
hid-cmedia.c
hid-core.c Merge branch 'for-5.9/upstream-fixes' into for-linus 2020-10-15 20:41:43 +02:00
hid-corsair.c
hid-cougar.c HID: cougar: Constify cougar_id_table 2020-08-17 11:38:49 +02:00
hid-cp2112.c HID: cp2112: Use irqchip template 2020-08-17 11:59:09 +02:00
hid-creative-sb0540.c
hid-cypress.c HID: cypress: Support Varmilo Keyboards' media hotkeys 2020-10-23 13:23:44 +02:00
hid-debug.c HID: hid-debug: fix nonblocking read semantics wrt EIO/ERESTARTSYS 2020-09-09 08:47:38 +02:00
hid-dr.c
hid-elan.c HID: elan: Fix memleak in elan_input_configured 2020-09-01 09:11:24 +02:00
hid-elecom.c HID: elecom: drop stray comment 2020-11-25 17:40:23 +01:00
hid-elo.c
hid-emsff.c
hid-ezkey.c
hid-gaff.c
hid-gembird.c
hid-generic.c
hid-gfrm.c
hid-glorious.c
hid-google-hammer.c
hid-gt683r.c
hid-gyration.c
hid-holtek-kbd.c
hid-holtek-mouse.c
hid-holtekff.c
hid-hyperv.c HID: hyperv: Use VMBUS_RING_SIZE() for ringbuffer sizes 2020-09-28 08:57:28 +00:00
hid-icade.c
hid-ids.h HID: Ignore battery for Elan touchscreen on ASUS UX550 2021-01-08 16:52:22 +01:00
hid-input.c HID: Ignore battery for Elan touchscreen on ASUS UX550 2021-01-08 16:52:22 +01:00
hid-ite.c HID: ite: Add support for Acer S1002 keyboard-dock 2020-11-27 16:15:29 +01:00
hid-jabra.c
hid-kensington.c
hid-keytouch.c
hid-kye.c
hid-lcpower.c
hid-led.c
hid-lenovo.c HID: lenovo: Fix spurious F23 key press report during resume from suspend 2020-07-07 12:42:27 +02:00
hid-lg-g15.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hid-lg.c
hid-lg.h
hid-lg2ff.c
hid-lg3ff.c
hid-lg4ff.c
hid-lg4ff.h
hid-lgff.c
hid-logitech-dj.c HID: logitech-dj: add the G602 receiver 2021-01-08 15:51:41 +01:00
hid-logitech-hidpp.c HID: logitech-hidpp: Add product ID for MX Ergo in Bluetooth mode 2021-01-14 13:27:35 +01:00
hid-macally.c HID: macally: Constify macally_id_table 2020-08-17 11:38:49 +02:00
hid-magicmouse.c HID: magicmouse: do not set up autorepeat 2020-06-16 17:34:14 +02:00
hid-maltron.c
hid-mcp2221.c HID: mcp2221: Fix GPIO output handling 2020-11-05 11:16:53 +01:00
hid-mf.c HID: mf: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter 2020-11-25 14:30:33 +01:00
hid-microsoft.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2020-09-02 12:55:46 -07:00
hid-monterey.c
hid-multitouch.c HID: multitouch: Apply MT_QUIRK_CONFIDENCE quirk for multi-input devices 2021-01-25 09:34:15 +01:00
hid-nti.c
hid-ntrig.c
hid-ortek.c
hid-penmount.c
hid-petalynx.c
hid-picolcd.h
hid-picolcd_backlight.c
hid-picolcd_cir.c media: rc: harmonize infrared durations to microseconds 2020-09-03 16:18:55 +02:00
hid-picolcd_core.c
hid-picolcd_debugfs.c
hid-picolcd_fb.c
hid-picolcd_lcd.c
hid-picolcd_leds.c
hid-pl.c
hid-plantronics.c
hid-primax.c
hid-prodikeys.c
hid-quirks.c Merge branch 'for-5.11/elecom' into for-linus 2020-12-16 11:41:05 +01:00
hid-redragon.c
hid-retrode.c
hid-rmi.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2020-10-23 16:16:31 -07:00
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c Merge branch 'for-5.9/upstream-fixes' into for-linus 2020-10-15 20:41:43 +02:00
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-konepure.c
hid-roccat-kovaplus.c
hid-roccat-kovaplus.h
hid-roccat-lua.c
hid-roccat-lua.h
hid-roccat-pyra.c
hid-roccat-pyra.h
hid-roccat-ryos.c
hid-roccat-savu.c
hid-roccat-savu.h
hid-roccat.c
hid-saitek.c
hid-samsung.c
hid-sensor-custom.c
hid-sensor-hub.c HID: hid-sensor-hub: Fix issue with devices with no report ID 2020-11-05 11:09:28 +01:00
hid-sjoy.c
hid-sony.c Merge branch 'for-5.11/sony' into for-linus 2020-12-16 11:42:47 +01:00
hid-speedlink.c
hid-steam.c HID: steam: fixes race in handling device list. 2020-06-19 09:21:21 +02:00
hid-steelseries.c
hid-sunplus.c
hid-tivo.c
hid-tmff.c
hid-topseed.c
hid-twinhan.c
hid-u2fzero.c
hid-uclogic-core.c HID: uclogic: Add ID for Trust Flex Design Tablet 2020-10-22 11:52:02 +02:00
hid-uclogic-params.c HID: uclogic: remove h from printk format specifier 2021-01-07 10:14:57 +01:00
hid-uclogic-params.h
hid-uclogic-rdesc.c
hid-uclogic-rdesc.h
hid-udraw-ps3.c HID: udraw-ps3: Replace HTTP links with HTTPS ones 2020-07-20 12:24:41 +02:00
hid-viewsonic.c
hid-vivaldi.c HID: add vivaldi HID driver 2020-09-30 22:44:26 +02:00
hid-waltop.c
hid-wiimote-core.c HID: wiimote: remove h from printk format specifier 2021-01-07 10:14:58 +01:00
hid-wiimote-debug.c
hid-wiimote-modules.c HID: Wiimote: Treat the d-pad as an analogue stick 2020-06-19 14:17:22 +02:00
hid-wiimote.h HID: Wiimote: Treat the d-pad as an analogue stick 2020-06-19 14:17:22 +02:00
hid-xinmo.c
hid-zpff.c
hid-zydacron.c
hidraw.c HID: hidraw: Add additional hidraw input/output report ioctls. 2020-11-27 15:48:31 +01:00
uhid.c
wacom.h
wacom_sys.c HID: wacom: Correct NULL dereference on AES pen proximity 2021-01-26 11:53:53 +01:00
wacom_wac.c Merge branch 'for-5.9/upstream-fixes' into for-linus 2020-10-15 20:41:43 +02:00
wacom_wac.h HID: wacom: Correct NULL dereference on AES pen proximity 2021-01-26 11:53:53 +01:00