🇰🇷 한글 설명
Linux 커널의 hid-goodix-spi 드라이버에서 스택 버퍼 오버플로우 취약점이 발견되었습니다. hidraw SET_REPORT ioctl을 통해 128바이트 크기의 스택 버퍼보다 큰 보고서를 전송할 경우 메모리 오버플로우가 발생할 수 있습니다.
💡 쉬운 설명
특정 터치패드나 센서 드라이버가 입력받는 데이터의 크기를 제대로 확인하지 않아 발생하는 문제입니다. 공격자가 조작된 데이터를 보내면 컴퓨터의 중요한 메모리 영역을 넘쳐흐르게 만들어 시스템을 망가뜨릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
HID: hid-goodix-spi: validate report size to prevent stack buffer overflow
goodix_hid_set_raw_report() builds a protocol frame in a 128-byte stack
buffer (tmp_buf), writing an 11-12 byte header followed by the
caller-supplied report data. The HID core caps report size at
HID_MAX_BUFFER_SIZE (16384) by default, while the driver does not set
hid_ll_driver.max_buffer_size and performs no bounds checking before
copying the payload:
memcpy(tmp_buf + tx_len, buf, len);
A hidraw SET_REPORT ioctl with a report larger than ~116 bytes
overflows the stack buffer.
Add a size check after constructing the header, rejecting reports that
would exceed the buffer capacity.
Discovered by Atuin - Automated Vulnerability Discovery Engine.
📍 영향받는 시스템
Linux kernel (hid-goodix-spi 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
hidraw 장치를 통한 조작된 크기의 SET_REPORT ioctl 호출
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 보고서 크기 검증 로직을 적용해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 패치된 버전인지 확인합니다.