🇰🇷 한글 설명
Linux 커널의 ims-pcu 드라이버에서 ims_pcu_process_data() 함수가 입력 데이터의 크기를 검증하지 않아 발생하는 힙 버퍼 오버플로우 취약점입니다. 악의적인 USB 장치가 허용된 버퍼 크기보다 큰 패킷을 전송할 경우, read_pos 인덱스를 조작하여 제어 흐름을 탈취할 수 있습니다.
💡 쉬운 설명
특수하게 제작된 USB 장치를 컴퓨터에 연결하면 시스템의 메모리 영역을 망가뜨릴 수 있는 보안 약점입니다. 이를 통해 공격자가 컴퓨터의 제어권을 가로챌 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Input: ims-pcu - fix heap-buffer-overflow in ims_pcu_process_data()
The `ims_pcu_process_data()` processes incoming URB data byte by byte.
However, it fails to check if the `read_pos` index exceeds
IMS_PCU_BUF_SIZE.
If a malicious USB device sends a packet larger than IMS_PCU_BUF_SIZE,
`read_pos` will increment indefinitely. Moreover, since `read_pos` is
located immediately after `read_buf`, the attacker can overwrite
`read_pos` itself to arbitrarily control the index.
This manipulated `read_pos` is subsequently used in
`ims_pcu_handle_response()` to copy data into `cmd_buf`, leading to a
heap buffer overflow.
Specifically, an attacker can overwrite the `cmd_done.wait.head` located
at offset 136 relative to `cmd_buf` in the `ims_pcu_handle_response()`.
Consequently, when the driver calls `complete(&pcu->cmd_done)`, it
triggers a control flow hijack by using the manipulated pointer.
Fix this by adding a bounds check for `read_pos` before writing to
`read_buf`. If the packet is too long, discard it, log a warning,
and reset the parser state.
[dtor: factor out resetting packet state, reset checksum as well]
📍 영향받는 시스템
Linux kernel (ims-pcu driver component)
⚔️ 공격 벡터
악의적으로 조작된 대용량 패킷을 전송하는 USB 장치를 통한 물리적/로컬 공격
🛡️ 대응 방법
ims_pcu_process_data() 함수 내에 read_pos 인덱스의 경계 검사 로직을 추가하여 패킷 크기를 제한해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.
💻 영향받는 소프트웨어
NVIDIA GPU Display Driver for Linux