CVE-2026-64271: Input: touchwin - reset the packet index on every complete packet
In the Linux kernel, the following vulnerability has been resolved:
Input: touchwin - reset the packet index on every complete packet
twinterrupt() accumulates each non-zero serial byte into a fixed three-byte buffer with a running index that is only reset once a full packet has been received and the device's two Y bytes agree:
tw->data[tw->idx++] = data; if (tw->idx == TWLENGTH && tw->data[1] == tw->data[2]) { ... tw->idx = 0; }
The reset is gated on tw->data[1] == tw->data[2], a value the device controls. A malicious, malfunctioning or counterfeit Touchwindow peripheral can stream non-zero bytes whose 2nd and 3rd bytes differ: the index reaches TWLENGTH without the equality holding, is never reset, and keeps growing, so tw->data[tw->idx++] walks off the end of the three-byte array and the rest of the heap-allocated struct tw, one attacker-chosen byte at a time -- an unbounded, device-driven heap out-of-bounds write.
Reset the index on every completed packet and report an event only when the two Y bytes match, like the other serio touchscreen drivers do.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the touchwin driver, reset the packet index when a complete three-byte packet is received, and report an event only when tw->data[1] == tw->data[2].
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Systems using the Linux kernel Touchwindow serial touchscreen driver are exposed when a malicious, malfunctioning, or counterfeit Touchwindow peripheral can send crafted non-zero serial bytes. Exploitation requires local access and low privileges according to the CVSS vector.
What does an attacker need to do to trigger the memory corruption?
The vulnerable behavior is triggered when the peripheral sends packets whose second and third bytes differ. This prevents the packet index from resetting after a three-byte packet, allowing subsequent device-controlled bytes to write beyond the fixed buffer.
What is the remediation?
Apply an available patch. The fix resets the packet index after every complete packet and only reports an input event when the two Y bytes match.