🇰🇷 한글 설명
Linux 커널의 PREEMPT_RT 환경에서 irq_work_single() 함수 실행 중 Use-After-Free 취약점이 발견되었습니다. BUSY 상태가 해제된 후에도 작업 객체에 접근하여, 다른 CPU에서 해당 객체를 먼저 해제할 경우 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 어떤 작업을 처리하는 도중에 그 작업에 필요한 메모리를 미리 지워버려서 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
irq_work: Fix use-after-free in irq_work_single() on PREEMPT_RT
On PREEMPT_RT, non-HARD irq_work runs in per-CPU kthreads via
run_irq_workd(), so irq_work_sync() uses rcuwait() to wait for BUSY==0.
After irq_work_single() clears BUSY via atomic_cmpxchg(), it still
dereferences @work for irq_work_is_hard() and rcuwait_wake_up().
An irq_work_sync() caller on another CPU that enters after BUSY is cleared
can observe BUSY==0 immediately, return, and free the work before those
accesses complete — causing a use-after-free.
Fix this by wrapping run_irq_workd() in guard(rcu)() so that the entire
irq_work_single() execution is within an RCU read-side critical
section. Then add synchronize_rcu() in irq_work_sync() after
rcuwait_wait_event() to ensure the caller waits for the RCU grace period
before returning, preventing premature frees.
📍 영향받는 시스템
PREEMPT_RT 패치가 적용된 Linux 커널
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 특정 인터럽트 작업(irq_work)을 유도하여 메모리 오류 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 확인