KernelScan.io

HIGH Introduced in 4.1

input Sur40 Registration Race

CVE-2026-80559

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI4.4MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: Input: sur40 - fix input device registration ordering In sur40_probe(), input_register_device() was previously called early before the V4L2 video device and vb2_queue components were fully initialized. If userspace opened the input device immediately upon registration, sur40_open() would trigger and start the sur40_poll() worker thread. This worker thread invokes sur40_process_video() and accesses the uninitialized vb2_queue structure, leading to a data race and potential system crash. Furthermore, if V4L2 or video registration failed after input_register_device() succeeded, the error path fell through to calling input_free_device() on a successfully registered device instead of input_unregister_device(), corrupting input core state. Move input_register_device() to the very end of sur40_probe(). This ensures the V4L2 and video queue structures are fully initialized before polling can start, and naturally resolves the error path bug since input_free_device() is now only called when input registration has not yet occurred. To maintain strict LIFO (Last-In, First-Out) teardown ordering, also move input_unregister_device() to the very beginning of sur40_disconnect(). This guarantees that the input polling worker thread is stopped before V4L2 video components or control handlers are unregistered.

02

Engine v0.6.0

Risk summary

A USB touchscreen driver registers its input device before V4L2 video components are fully initialized, creating a race window where opening the input device triggers a worker thread that accesses uninitialized video buffer structures, potentially crashing the kernel. An attacker needs physical access to plug in a compatible USB device; the race is then triggered by any process that opens the input device, including automated desktop input handlers.

Affecteddrivers/input/touchscreen/sur40.c (input touchscreen)

Vulnerability analysis

The sur40 USB touchscreen driver registers its input device early in the probe sequence, before the V4L2 video device and video buffer queue are fully initialized. If userspace opens the input device immediately after registration, the driver's polling worker thread starts and accesses the not-yet-initialized video buffer queue, causing a data race that can crash the kernel. The fix moves input device registration to the end of the probe function, ensuring all video components are ready before the input device becomes visible to userspace, and corrects the disconnect sequence to unregister the input device first. The vulnerability requires physical access to plug in a compatible USB touchscreen device; the race window opens during the kernel's device probe and can be triggered by any process that opens the input device, including automated desktop input handlers.

03

BranchIntroducedFixed inPatch commit
6.184.16.18.465c1c5227c93f
6.124.16.12.10583aa12f9f246
5.104.15.10.266cd4ecce2fd87
5.154.15.15.217dab741c9da72
6.64.16.6.1533e8ed76a4f35
6.14.16.1.184764b507be7b5
mainline4.17.29da976eb649c
7.14.17.1.10beb9b0bd6e6e
cip/5.104.15.10.268-cip77cd4ecce2fd87
cip/5.10-rt4.15.10.268-cip77-rt34cd4ecce2fd87
cip/6.14.16.1.187-cip60764b507be7b5
cip/6.124.16.12.108-cip3183aa12f9f246