🇰🇷 한글 설명
Linux 커널의 intel-thc-hid 드라이버에서 보고서 크기 검증 미흡으로 인한 힙 버퍼 오버플로 취약점이 발견되었습니다. 공격자가 hidraw ioctl을 통해 허용된 크기보다 큰 데이터를 전송할 경우, 할당된 메모리 범위를 넘어 데이터가 복사되어 시스템 권한 탈취나 서비스 거부가 발생할 수 있습니다.
💡 쉬운 설명
터치 컨트롤러를 제어하는 소프트웨어에서 데이터 크기를 제대로 확인하지 않아 발생하는 문제입니다. 나쁜 의도를 가진 데이터가 정해진 그릇보다 크게 들어오면 컴퓨터의 중요한 메모리 영역을 망가뜨릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
HID: intel-thc-hid: intel-quickspi: validate report size before copy
write_cmd_to_txdma() builds an output report in qsdev->report_buf, a heap
buffer allocated in quickspi_alloc_report_buf() to the device-descriptor
derived max_report_len (a few hundred bytes for a touch controller). It
copies the caller-supplied report into that buffer:
memcpy(write_buf->content, report_buf, report_buf_len);
The HID core caps a report at HID_MAX_BUFFER_SIZE (16384) by default, and
quickspi_hid_ll_driver does not set max_buffer_size, so the length reaches
the driver unbounded. A hidraw SET_REPORT/SET_FEATURE ioctl carrying a
report larger than max_report_len therefore overflows report_buf with
attacker-controlled length and content.
Record the report_buf allocation size and reject reports that do not fit
before copying, matching the equivalent guard in the intel-quicki2c
sibling (quicki2c_init_write_buf()) and the hid-goodix-spi fix.
write_cmd_to_txdma() writes the output report header ahead of the content
in the same buffer, so size the allocation to cover the header as well.
That keeps the added bound from rejecting a maximum-sized report.
📍 영향받는 시스템
Linux kernel (intel-thc-hid 드라이버가 포함된 버전)
⚔️ 공격 벡터
로컬 공격자가 hidraw 장치에 SET_REPORT 또는 SET_FEATURE ioctl을 사용하여 조작된 대용량 보고서를 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 보고서 크기 검증 로직을 적용해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 최신 패치 버전인지 확인합니다.