🇰🇷 한글 설명
Linux 커널의 NTB(Non-Transparent Bridge) epf 모듈에서 하드웨어 인터럽트(hardirq) 컨텍스트 내에 pci_irq_vector()를 호출하여 발생하는 취약점입니다. 이 함수는 내부적으로 뮤텍스(mutex)를 사용하는데, 원자적(atomic) 상태인 인터럽트 컨텍스트에서 잠금을 시도함으로써 'scheduling while atomic' 오류와 시스템 충돌을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 엔진인 커널이 아주 급한 업무를 처리하는 도중에, 잠시 멈춰서 기다려야 하는 작업을 수행하려다 시스템이 엉켜버리는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
NTB: epf: Avoid calling pci_irq_vector() from hardirq context
ntb_epf_vec_isr() calls pci_irq_vector() in hardirq context to derive
the vector number. pci_irq_vector() calls msi_get_virq() that takes a
mutex and can therefore trigger "scheduling while atomic" splats:
BUG: scheduling while atomic: kworker/u33:0/55/0x00010001
...
Call trace:
...
schedule+0x38/0x110
schedule_preempt_disabled+0x28/0x50
__mutex_lock.constprop.0+0x848/0x908
__mutex_lock_slowpath+0x18/0x30
mutex_lock+0x4c/0x60
msi_domain_get_virq+0xe8/0x138
pci_irq_vector+0x2c/0x60
ntb_epf_vec_isr+0x28/0x120 [ntb_hw_epf]
__handle_irq_event_percpu+0x70/0x3a8
handle_irq_event+0x48/0x100
handle_edge_irq+0x100/0x1c8
...
Cache the Linux IRQ number for vector 0 when vectors are allocated and
use it as a base in the ISR. Running the ISR in a threaded IRQ handler
would also avoid the problem, but that would be unnecessary here.
📍 영향받는 시스템
Linux kernel (NTB epf driver 사용 환경)
⚔️ 공격 벡터
로컬 공격자가 특정 하드웨어 인터럽트 조건을 유도하여 커널 패닉(Kernel Panic)을 일으키는 서비스 거부(DoS) 공격 가능
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하여 IRQ 번호를 캐싱하도록 수정된 코드를 적용해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.