linux/drivers/input
Iván Ezequiel Rodriguez 8b852965b8 Input: evdev - zero absinfo before partial copy in EVIOCSABS
The EVIOCSABS handler copies at most the user supplied ioctl size into
an uninitialized on-stack struct input_absinfo:

	if (copy_from_user(&abs, p, min_t(size_t,
			size, sizeof(struct input_absinfo))))

The size comes from _IOC_SIZE() of the ioctl command and is therefore
fully controlled by userspace. A short size leaves the trailing part of
the structure holding whatever was on the kernel stack, and the whole
structure is then stored into the device:

	dev->absinfo[t] = abs;

EVIOCGABS hands that back to userspace, disclosing the stale stack
bytes. Only the resolution field is currently cleared, which covers the
legacy struct layout but not an arbitrarily short size.

Zero the structure before the copy so any part not supplied by the
caller reads back as zero. The existing resolution fixup is kept, since
it also handles a size that partially overlaps that field.

Fixes: 448cd1664a ("Input: evdev - rearrange ioctl handling")
Cc: stable@vger.kernel.org
Signed-off-by: Iván Ezequiel Rodriguez <ivanrwcm25@gmail.com>
Link: https://patch.msgid.link/20260901130629.24078-2-ivanrwcm25@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-09-01 07:38:07 -07:00
..
gameport Input: Drop unused assignments from pnp_device_id arrays 2026-06-10 09:56:01 -07:00
joystick Input: iforce - validate input packet lengths 2026-07-24 20:49:53 -07:00
keyboard Input: atkbd - skip deactivate for Xiaomi Redmi Book Pro 16 2026 2026-08-28 05:03:22 -07:00
misc Merge branch 'next' into for-linus 2026-08-14 21:26:07 -07:00
mouse Merge branch 'next' into for-linus 2026-08-14 21:26:07 -07:00
rmi4 Input: synaptics-rmi4 - fix GPF in suspend and resume when unbound 2026-08-30 14:56:26 -07:00
serio Input: gscps2 - supply PA-RISC keyboard keymap via device property 2026-08-05 22:45:01 -07:00
tablet Input: remove changelogs 2026-06-10 11:04:17 -07:00
tests Input updates for v6.11-rc0 2024-07-19 16:51:39 -07:00
touchscreen Merge branch 'next' into for-linus 2026-08-14 21:26:07 -07:00
apm-power.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
evdev.c Input: evdev - zero absinfo before partial copy in EVIOCSABS 2026-09-01 07:38:07 -07:00
ff-core.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ff-memless.c Input: stop force-feedback timer when unregistering input devices 2026-06-22 22:33:01 -07:00
input-compat.c Input: move input_bits_to_string() to input-compat.c 2025-08-21 12:00:58 -07:00
input-compat.h Input: move input_bits_to_string() to input-compat.c 2025-08-21 12:00:58 -07:00
input-core-private.h
input-leds.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
input-mt.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
input-poller.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
input-poller.h
input.c Input: reject inhibit and uninhibit requests on unregistering devices 2026-08-05 23:01:44 -07:00
joydev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig Input: remove evbug driver 2024-12-17 13:53:52 -08:00
Makefile Input: touch-overlay - add touchscreen overlay handling 2025-07-27 01:41:21 -07:00
matrix-keymap.c Input: matrix-keymap - switch to using __free() cleanup facility 2024-08-29 10:59:30 -07:00
mousedev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sparse-keymap.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
touch-overlay.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
touchscreen.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
vivaldi-fmap.c Input: add missing MODULE_DESCRIPTION() macros 2024-06-09 14:38:48 -07:00