From 649d65dbba9fe3058862a2e15262992a259e8a8d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 26 May 2026 10:49:38 +1000 Subject: [PATCH] touchpad: fix the libwacom_is_reversible() check on the paired device dev was already freed, the device we want to check here is d so technically this is a UAF bug. Fortunately for us, this condition was never triggered - none of the current devices in libwacom that have a PairedID setting are also touchpads (they're all display tablets). Assisted-by: Claude:claude-opus-4-6 Part-of: --- src/evdev-mt-touchpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 0c1c3803..58812db9 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -3953,7 +3953,7 @@ tp_requires_rotation(struct tp_dispatch *tp, struct evdev_device *device) paired = libwacom_get_paired_device(*d); if (paired && libwacom_match_get_vendor_id(paired) == vid && libwacom_match_get_product_id(paired) == pid) { - rotate = libwacom_is_reversible(dev); + rotate = libwacom_is_reversible(*d); break; } d++;