🇰🇷 한글 설명
Linux 커널 HID 드라이버의 wacom 모듈에서 wacom_wac_pen_serial_enforce() 함수가 잘못된 오프셋을 계산하여 범위를 벗어난 메모리를 읽을 수 있습니다. 이로 인해 보고서 끝을 넘어선 값이 wacom_wac->serial[0]에 저장되어 MSC_SERIAL 이벤트로 사용자 공간에 노출되는 정보 노출 취약점입니다.
💡 쉬운 설명
특정 태블릿 펜 드라이버가 실제 데이터 범위를 넘어서 메모리를 읽는 버그가 있습니다. 읽은 값이 사용자 프로그램에 전달될 수 있어 내부 메모리 정보가 새어 나갈 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
HID: wacom: fix OOB read in wacom_wac_pen_serial_enforce()
The 'wacom_wac_pen_serial_enforce()' function may calculate and pass an
invalid offset to hid_field_extract(), resulting in memory reads at
incorrect addresses -- possibly beyond the end of the report. If a
field in the HID descriptor lists more usages than its Report Count
actually reserves space for, the function's inner 'j' will walk past
the end of the field:
for (i = 0; i < report->maxfield; i++) {
for (j = 0; j < report->field[i]->maxusage; j++) {
...
value = hid_field_extract(hdev, raw_data + 1,
offset + j * size, size);
A descriptor listing 12288 usages against Report Count 1 has the loop
extract the usage at index 12287 from bit offset 98296 -- about 12 KB
past a 2-byte received report. The value is stored in
wacom_wac->serial[0] and can reach userspace as an MSC_SERIAL event,
making this an information disclosure.
Clamp the loop to field->report_count, the number of value slots the
report holds. Value slots past the last declared usage are still
scanned; they reuse that usage (HID 1.11, 6.2.2.8).
Verified on v6.12.105 with a UHID reproducer: a 2-byte report from
such a descriptor trips KASAN before the patch and not after it.
📍 영향받는 시스템
패치 전 Linux 커널의 HID wacom 드라이버를 사용하는 시스템 (예: v6.12.105 등 해당 시점 이전 버전)
⚔️ 공격 벡터
악성 HID 디바이스(USB/UHID)가 필드 usage 수가 Report Count보다 많은 특수 HID 디스크립터를 제시하여 커널 메모리 일부를 읽고 정보를 유출
🛡️ 대응 방법
커널을 패치된 버전(해당 커널 보안 업데이트)으로 업그레이드하거나 배포판의 최신 보안 업데이트를 적용
🔧 검증 코드
커널 버전이 패치된 최신 버전인지 확인하고, wacom 모듈이 로드되어 있다면 취약 가능성이 있으므로 배포판 보안 공지에서 해당 패치 적용 여부를 확인
uname -r && grep -i wacom /proc/modules 2>/dev/null