kernel_samsung_a53x/drivers/input
Mathias Krause 382027a63c Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal
commit fbf8d71742557abaf558d8efb96742d442720cc2 upstream.

Calling irq_domain_remove() will lead to freeing the IRQ domain
prematurely. The domain is still referenced and will be attempted to get
used via rmi_free_function_list() -> rmi_unregister_function() ->
irq_dispose_mapping() -> irq_get_irq_data()'s ->domain pointer.

With PaX's MEMORY_SANITIZE this will lead to an access fault when
attempting to dereference embedded pointers, as in Torsten's report that
was faulting on the 'domain->ops->unmap' test.

Fix this by releasing the IRQ domain only after all related IRQs have
been deactivated.

Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain")
Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Link: https://lore.kernel.org/r/20240222142654.856566-1-minipli@grsecurity.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:49 +01:00
..
gameport Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
input_boost Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
joystick Input: xpad - add Razer Wolverine V2 support 2024-11-18 12:12:17 +01:00
keyboard Input: adp5589-keys - fix adp5589_gpio_get_value() 2024-11-23 23:21:46 +01:00
misc Input: uinput - reject requests with unreasonable number of slots 2024-11-23 23:21:06 +01:00
mouse Input: synaptics - enable SMBus for HP Elitebook 840 G2 2024-11-23 23:21:10 +01:00
rmi4 Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal 2024-11-23 23:21:49 +01:00
sec_input Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serio Input: i8042 - add another board name for TUXEDO Stellaris Gen5 AMD line 2024-11-23 23:21:30 +01:00
tablet Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
touchscreen Input: goodix - use the new soc_intel_is_byt() helper 2024-11-23 23:21:29 +01:00
apm-power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
evbug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
evdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ff-core.c Input: ff-core - prefer struct_size over open coded arithmetic 2024-11-19 14:19:40 +01:00
ff-memless.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
input-compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
input-compat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
input-leds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
input-mt.c Input: MT - limit max slots 2024-11-23 23:20:50 +01:00
input-polldev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
input-poller.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
input-poller.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
input.c Input: try trimming too long modalias strings 2024-11-19 14:19:02 +01:00
joydev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
matrix-keymap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mousedev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sparse-keymap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00