🇰🇷 한글 설명
Linux 커널의 comedi pcl726 드라이버에서 과도하게 큰 IRQ 번호 입력값을 검증하지 않아 발생하는 취약점입니다. 사용자가 유효하지 않은 IRQ 번호(예: 0x80008000)를 전달할 수 있으며, 특히 `1 << it->options[1]`이 31일 때 부호 비트로 시프트되는 정의되지 않은 동작(UB)을 유발합니다.
💡 쉬운 설명
Linux 커널의 특정 장치 드라이버가 매우 큰 인터럽트 번호를 거절하지 않아 문제가 발생합니다. 공격자가 잘못된 설정값을 제공해서 장치를 중단시키거나 예기치 않은 동작을 유발할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
comedi: pcl726: Prevent invalid irq number
The reproducer passed in an irq number(0x80008000) that was too large,
which triggered the oob.
Added an interrupt number check to prevent users from passing in an irq
number that was too large.
If `it->options[1]` is 31, then `1 << it->options[1]` is still invalid
because it shifts a 1-bit into the sign bit (which is UB in C).
Possible solutions include reducing the upper bound on the
`it->options[1]` value to 30 or lower, or using `1U << it->options[1]`.
The old code would just not attempt to request the IRQ if the
`options[1]` value were invalid. And it would still configure the
device without interrupts even if the call to `request_irq` returned an
error. So it would be better to combine this test with the test below.
📍 영향받는 시스템
Linux kernel 전체 (comedi pcl726 드라이버를 포함한 시스템)
⚔️ 공격 벡터
로컬 사용자가 comedi pcl726 드라이버 인터페이스에 유효하지 않은 IRQ 옵션값(options[1] ≥ 31)을 전달하여 OOB 또는 정의되지 않은 동작 유발
🛡️ 대응 방법
Linux 커널을 최신 패치 버전으로 업데이트하여 IRQ 입력값 범위 검증(options[1] ≤ 30 또는 부호 없는 시프트 연산) 적용
🔧 검증 코드
comedi 모듈이 로드되어 있고 현재 커널 버전을 확인합니다. pcl726 패치가 적용된 최신 커널 버전(일반적으로 6.6+ 안정 버전)에서는 IRQ 검증이 강화되어야 합니다.
lsmod | grep comedi && cat /proc/version | grep -oE 'Linux version [^ ]+'