🇰🇷 한글 설명
Linux 커널의 ibmasm 드라이버에서 ibmasm_handle_mouse_interrupt() 함수가 하드웨어의 큐 인덱스 범위를 검증하지 않아 발생하는 OOB MMIO 읽기 취약점입니다. 공격자가 조작된 서비스 프로세서를 통해 범위를 벗어난 값을 MMIO 레지스터에 쓰면, 잘못된 메모리 주소를 참조하여 시스템 중단(Machine Check Exception)을 유발할 수 있습니다.
💡 쉬운 설명
하드웨어 장치가 잘못된 번호를 알려줄 때, 컴퓨터가 그 번호를 확인하지 않고 바로 읽으려다 시스템이 멈춰버리는 문제입니다. 공격자가 이 번호를 조작하면 컴퓨터를 강제로 다운시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
misc: ibmasm: fix OOB MMIO read in ibmasm_handle_mouse_interrupt()
ibmasm_handle_mouse_interrupt() performs an out-of-bounds MMIO read
when the queue reader or writer index from hardware exceeds
REMOTE_QUEUE_SIZE (60).
A compromised service processor can trigger this by writing an
out-of-range value to the reader or writer MMIO register before
asserting an interrupt. Since writer is re-read from hardware on
every loop iteration, it can also be set to an out-of-range value
after the loop has already started.
The root cause is that get_queue_reader() and get_queue_writer() return
raw readl() values that are passed directly into get_queue_entry(),
which computes:
queue_begin + reader * sizeof(struct remote_input)
with no bounds check. This unchecked MMIO address is then passed to
memcpy_fromio(), reading 8 bytes from unintended device registers.
For sufficiently large values the address falls outside the PCI BAR
mapping entirely, triggering a machine check exception.
Fix by checking both indices against REMOTE_QUEUE_SIZE at the top of
the loop body, before any call to get_queue_entry(). On an out-of-range
value, reset the reader register to 0 via set_queue_reader() before
breaking, so that normal queue operation can resume if the corrupted
hardware state is transient.
📍 영향받는 시스템
Linux kernel (ibmasm driver 포함 버전)
⚔️ 공격 벡터
조작된 서비스 프로세서가 MMIO 레지스터에 범위를 벗어난 인덱스 값을 기록하여 인터럽트 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 인덱스 범위 검증 로직 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인