🇰🇷 한글 설명
Goodix GT9xx 입력 드라이버의 gt911_process() 함수에서 터치 포인트 개수를 검증 없이 스택 배열의 루프 경계로 사용하여 발생하는 스택 기반 버퍼 오버플로 취약점입니다. 공격자가 조작된 I2C 컨트롤러를 통해 설정된 최대 터치 포인트보다 많은 값을 보고하면 커널 권한으로 스택 메모리에 임의의 데이터를 쓸 수 있습니다.
💡 쉬운 설명
터치스크린 장치가 실제 허용된 범위보다 더 많은 손가락 터치 정보를 보내면, 컴퓨터의 중요한 메모리 영역이 망가질 수 있는 문제입니다. 이를 통해 해커가 시스템의 제어권을 탈취하거나 시스템을 멈추게 할 수 있습니다.
🇺🇸 원문 (English)
The Goodix GT9xx input driver in drivers/input/input_gt911.c reads the touch point count from the controller's status register and masks it with GT911_TOUCH_POINTS_MSK (0x0F), yielding a value of 0..15. In gt911_process() that value is used directly as the loop bound for filling point_reg[], a stack array sized to CONFIG_INPUT_GT911_MAX_TOUCH_POINTS, 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 point_reg[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 gt911_process() 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 CONFIG_INPUT_GT911_MAX_TOUCH_POINTS before any array indexing.
📍 영향받는 시스템
Goodix GT9xx 입력 드라이버를 사용하는 커널 기반 시스템 (GT911 등)
⚔️ 공격 벡터
물리적으로 연결된 I2C 터치 컨트롤러를 조작하거나 위조된 하드웨어를 연결하여 공격
🛡️ 대응 방법
터치 포인트 개수를 CONFIG_INPUT_GT911_MAX_TOUCH_POINTS 값으로 제한(min 함수 사용)하도록 드라이버 패치 적용
🔧 검증 코드
해당 소스 코드에서 터치 포인트 개수를 검증하는 min() 함수 로직이 포함되어 있는지 확인
grep -r "GT911_TOUCH_POINTS_MSK" drivers/input/input_gt911.c
📊 CVSS Vector String
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
Cisco Crosswork Network Controller