🇰🇷 한글 설명
Linux 커널의 synaptics-rmi4 드라이버에서 F54 보고서 크기가 할당된 버퍼 크기를 초과할 수 있는 취약점이 발견되었습니다. 악의적인 RMI4 장치가 F55 전극 수를 조작하여 보고할 경우, 메모리 경계를 넘어 데이터를 쓰는 버퍼 오버플로우가 발생할 수 있습니다.
💡 쉬운 설명
터치패드와 같은 장치가 컴퓨터에 잘못된 크기의 데이터를 보내서 컴퓨터의 메모리 영역을 침범하는 문제입니다. 이를 통해 시스템이 멈추거나 해커가 악성 코드를 실행할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Input: synaptics-rmi4 - bound the F54 report size to the allocated buffer
rmi_f54_work() reads a diagnostics report from the device into
f54->report_data, sizing the transfer with rmi_f54_get_report_size():
report_size = rmi_f54_get_report_size(f54);
...
for (i = 0; i < report_size; i += F54_REPORT_DATA_SIZE) {
int size = min(F54_REPORT_DATA_SIZE, report_size - i);
...
rmi_read_block(.., f54->report_data + i, size);
}
report_data is allocated once at probe from F54's own electrode counts
(array3_size(f54->num_tx_electrodes, f54->num_rx_electrodes, sizeof(u16))),
but rmi_f54_get_report_size() computes the size from
drv_data->num_*_electrodes when those are set, i.e. from the F55
function's electrode counts. Both counts come straight from device
queries (F54 and F55 each report up to 255 electrodes) and nothing
constrains the F55 counts to the F54 ones.
A malicious or malfunctioning RMI4 device that reports larger F55
electrode counts than its F54 counts makes report_size exceed the
allocation, so the read loop writes past report_data (and the V4L2
dequeue memcpy() then reads past it). On conforming hardware the F55
configured electrodes are a subset of the F54 physical electrodes, so
report_size never exceeds the buffer and well-behaved devices are
unaffected.
Record the allocation size and reject a report that does not fit,
mirroring the existing zero-size check.
📍 영향받는 시스템
Linux kernel (synaptics-rmi4 driver)
⚔️ 공격 벡터
조작된 전극 수를 보고하는 악의적인 RMI4 하드웨어 장치를 통한 메모리 오버플로우 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 보고서 크기 검증 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.