summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorChen Changcheng <chenchangcheng@kylinos.cn>2026-08-14 15:06:21 +0800
committerJiri Kosina <jkosina@suse.com>2026-09-11 16:19:06 +0200
commitd3aba3442798ce4a4c8ce3104d7b286d61e605f9 (patch)
treef59a73c11b23d94a2d26c6e4642bcfc1fb0c9506 /tools/lib/python/kdoc
parentaa9dde93e05a837645fdfd577eea71f0733f0694 (diff)
downloadlinux-next-d3aba3442798ce4a4c8ce3104d7b286d61e605f9.tar.gz
linux-next-d3aba3442798ce4a4c8ce3104d7b286d61e605f9.zip
HID: alps: fix use-after-free on input2 registration failure
alps_input_configured() stores data->input2 before calling input_register_device(). If registration fails, input_free_device() frees the input device but data->input2 still points to the freed memory. alps_input_configured() calls hid_hw_open() before allocating input2, so URBs are already active and raw_event can fire during the failure window. A U1_SP_ABSOLUTE_REPORT_ID report arriving then causes u1_raw_event() to dereference the freed data->input2 -> use-after-free. Fix by only storing input2 into drvdata after successful registration and adding a NULL guard in the raw_event path. Fixes: 2562756dde55 ("HID: add Alps I2C HID Touchpad-Stick support") Cc: stable@vger.kernel.org Signed-off-by: Chen Changcheng <chenchangcheng@kylinos.cn> Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions