CVE-2026-19576: Stack out-of-bounds write in the Goodix GT911 touch controller driver from an unvalidated device-reported touch point count
The Goodix GT9xx input driver in drivers/input/inputgt911.c reads the touch point count from the controller's status register and masks it with GT911TOUCHPOINTSMSK (0x0F), yielding a value of 0..15. In gt911process() that value is used directly as the loop bound for filling pointreg[], a stack array sized to CONFIGINPUTGT911MAXTOUCHPOINTS, whose Kconfig range is 1..5 with a default of 1. No other check constrains the count; the driver relied only on a comment asserting that the controller had been programmed at init to report no more points than configured.
Each loop iteration issues an I2C read of eight bytes straight into pointreg[i], so a controller that reports more points than the array holds causes up to 112 bytes of peer-supplied data to be written past the end of the array, over the stack frame of gt911process() in the system workqueue thread. Two further loops then read out of bounds from the same array. Triggering it requires control of, or the ability to substitute, the I2C touch controller — plausible on the many supported boards where the GT9xx panel is a pluggable display module or shield rather than an on-PCB part; a spoofed device need only answer the init probes with a supported product ID and a checksum-valid config blob. The same overflow can also occur non-adversarially, with a GT9271-class panel that ignores the driver's touch-count programming and reports up to ten points, or with bus corruption of the single status byte.
The impact is an out-of-bounds stack write with fully attacker-chosen content executing at kernel privilege, i.e. potential control-flow hijack on the host MCU, in addition to out-of-bounds reads and crashes. The attack vector is physical/local hardware access only; there is no network, USB, or syscall path to the defect. The fix clamps the reported count with min() against CONFIGINPUTGT911MAXTOUCHPOINTS before any array indexing.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Clamp the controller-reported touch point count with min() against CONFIG_INPUT_GT911_MAX_TOUCH_POINTS before any indexing of point_reg[].
Event History
Frequently Asked Questions
Which systems are most realistically exposed?
Systems using the Zephyr GT9xx input driver are exposed when an attacker can control or substitute the I2C touch controller. This is particularly plausible on supported boards where the GT9xx panel is a pluggable display module or shield rather than an on-board component.
Does the default configuration prevent the issue?
No. CONFIG_INPUT_GT911_MAX_TOUCH_POINTS defaults to 1, while the controller-reported count can be 0 through 15 and is not checked against the configured array size. A device reporting more touch points than configured can overrun the stack array.
What must an attacker do to trigger the condition?
The attacker needs control of, or the ability to replace, the I2C touch controller, then must provide a touch status response whose reported point count exceeds CONFIG_INPUT_GT911_MAX_TOUCH_POINTS. No software privileges or user interaction are indicated by the supplied severity vector.
How can an affected configuration be identified?
Check whether the Zephyr GT9xx input driver is enabled and determine CONFIG_INPUT_GT911_MAX_TOUCH_POINTS. Its permitted range is 1 through 5; any controller response above that configured value reaches accesses beyond the point_reg array.