🇰🇷 한글 설명
Linux 커널의 opt3001 조명 센서 드라이버에서 IRQ 핸들러가 플래그를 두 번 읽으면서 발생하는 데드락 취약점입니다. mutex 잠금 단계에서는 플래그가 true이지만 해제 단계에서 false로 변할 수 있어 mutex가 영구적으로 잠금된 상태로 유지됩니다. 플래그 값을 변수에 저장하여 두 단계에서 일관되게 사용함으로써 해결됩니다.
💡 쉬운 설명
Linux 커널의 광센서 드라이버가 신호 처리 중에 잠금을 제대로 풀지 못해 시스템이 무한 대기하는 문제입니다. 같은 상태 플래그를 다른 시점에 다르게 읽어서 발생하는 경합 조건입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
iio: light: opt3001: fix deadlock due to concurrent flag access
The threaded IRQ function in this driver is reading the flag twice: once to
lock a mutex and once to unlock it. Even though the code setting the flag
is designed to prevent it, there are subtle cases where the flag could be
true at the mutex_lock stage and false at the mutex_unlock stage. This
results in the mutex not being unlocked, resulting in a deadlock.
Fix it by making the opt3001_irq() code generally more robust, reading the
flag into a variable and using the variable value at both stages.
📍 영향받는 시스템
opt3001 드라이버를 포함하는 Linux 커널 (IIO 조명 드라이버 서브시스템)
⚔️ 공격 벡터
로컬 공격자가 IRQ 핸들러 타이밍을 조작하여 경합 조건 유발, 시스템 서비스 거부(DoS) 야기
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업데이트하여 opt3001 드라이버 패치 적용
🔧 검증 코드
opt3001이 출력되면 드라이버가 활성 상태이므로 uname -r로 커널 버전을 확인하여 최신 패치 적용 여부 확인
lsmod | grep opt3001 && echo 'opt3001 loaded - verify kernel version with uname -r' || echo 'opt3001 not loaded'