linux/drivers/input
Iván Ezequiel Rodriguez f84819ef8d Input: zero ff_effect before compat copy in input_ff_effect_from_user
In the compat path input_ff_effect_from_user() aliases the caller's
native struct ff_effect with the smaller struct ff_effect_compat and
copies only the compat sized prefix:

	compat_effect = (struct ff_effect_compat *)effect;

	if (copy_from_user(compat_effect, buffer,
			   sizeof(struct ff_effect_compat)))

The tail of the native structure is never written. Callers pass an
uninitialized on-stack object, for example evdev_do_ioctl() for
EVIOCSFF, so those bytes keep their previous stack contents.
input_ff_upload() then stores the full native structure in
ff->effects[id], from where a uinput based force feedback daemon can
read it back via UI_BEGIN_FF_UPLOAD, disclosing kernel stack memory to
userspace.

Zero the effect before the compat copy.

Fixes: 2d56f3a32c ("Input: refactor evdev 32bit compat to be shareable with uinput")
Cc: stable@vger.kernel.org
Signed-off-by: Iván Ezequiel Rodriguez <ivanrwcm25@gmail.com>
Link: https://patch.msgid.link/20260901130629.24078-3-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: zero ff_effect before compat copy in input_ff_effect_from_user 2026-09-01 07:38:07 -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