Skip to contentSkip to conversation

CVE-2026-99491: HID: wacom: Fix Use-After-Free in wacom_intuos_pad

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 19

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

HID: wacom: Fix Use-After-Free in wacom_intuos_pad

wacom_intuos_pad() accesses wacom->shared->touch_input locklessly inside the interrupt handler context. If the Touch sibling device is disconnected, wacom_remove_shared_data() clears 'touch_input' outside any lock, creating a Time-of-Check to Time-of-Use (TOCTOU) race condition where a preempted reader in interrupt context dereferences the freed pointer, leading to a Use-After-Free.

Resolve this by introducing RCU protection for the touch_input pointer:

- Annotate 'touch_input' in wacom_shared struct with __rcu
- Wrap all lockless readers in wacom_wac.c with guard(rcu)() and rcu_dereference() using a unified wacom_report_touch_mute() helper
- Update writers in wacom_sys.c using rcu_assign_pointer()
- Call synchronize_rcu() in wacom_remove_shared_data() to ensure all active RCU readers have finished before the input device is freed

Also wrap wacom_set_shared_values() and touch/pen assignments in wacom_add_shared_data() inside the wacom_udev_list_lock to serialize concurrent probe assignments, and verify that 'shared->touch == hdev' before setting touch_input to prevent concurrent sibling probe state desynchronization.

The Linux kernel CVE team has assigned CVE-2026-99491 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.14 with commit 961794a00eab03f4344b7d5e825e8e789e55da87 and fixed in 6.12.117 with commit 1178927ffa54a1f9e52fa4e5974862023237fce6
	Issue introduced in 3.14 with commit 961794a00eab03f4344b7d5e825e8e789e55da87 and fixed in 6.18.61 with commit ef74a8a685e272dbe0d21844c6e70841ccc9b1bc
	Issue introduced in 3.14 with commit 961794a00eab03f4344b7d5e825e8e789e55da87 and fixed in 7.3.2 with commit 4e1bf2f5fe28cb8719aee7ca9d99ea529224ed1f
	Issue introduced in 3.14 with commit 961794a00eab03f4344b7d5e825e8e789e55da87 and fixed in 7.4-rc1 with commit ef32877368a7013c060ef6bd03a30b6da2fe0c41
	Issue introduced in 3.13.8 with commit 37a5b5f89fe4e8367fb123b1892d79f0234a2903

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99491

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/1178927ffa54a1f9e52fa4e5974862023237fce6
	https://git.kernel.org/stable/c/ef74a8a685e272dbe0d21844c6e70841ccc9b1bc
	https://git.kernel.org/stable/c/4e1bf2f5fe28cb8719aee7ca9d99ea529224ed1f
	https://git.kernel.org/stable/c/ef32877368a7013c060ef6bd03a30b6da2fe0c41