🇰🇷 한글 설명
Linux 커널의 LoongArch 아키텍처 KVM에서 MSI 데이터에 대한 검증이 누락되어 발생하는 취약점입니다. 사용자 공간에서 전달된 MSI 데이터가 EIOINTC 범위 내에 있는지 확인하지 않아, 256 이상의 값이 입력될 경우 커널 메모리의 범위를 벗어난 읽기 및 쓰기가 발생하여 커널 메모리가 손상될 수 있습니다.
💡 쉬운 설명
가상 머신을 사용하는 사용자가 조작된 데이터를 보내 커널의 중요한 메모리 영역을 망가뜨릴 수 있는 보안 결함입니다. 이로 인해 시스템이 멈추거나 해커가 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: KVM: Validate MSI data before routing it to EIOINTC
pch_msi_set_irq() passes e->msi.data straight into eiointc_set_irq() as
the irq number. The MSI data comes from userspace, that either via a
KVM_IRQ_ROUTING_MSI entry set with KVM_SET_GSI_ROUTING (used by irqfd
and KVM_IRQ_LINE) or directly via KVM_SIGNAL_MSI, and is never checked
against EIOINTC_IRQS.
eiointc_set_irq() uses the value with __set_bit()/__clear_bit() on the
256-bit isr bitmap, eiointc_update_irq() then indexes sw_coremap[] and
the per-cpu coreisr/sw_coreisr bitmaps with it. Therefore a data value
>= 256 reads and writes memory past the end of those arrays, i.e. any
process holding a VM fd can corrupt kernel memory beyond the allocation
of loongarch_eiointc.
Reject MSI data that doesn't fit in the EIOINTC irq space. The DMSINTC
path is unaffected as it decodes the vector from the address and masks
it.
📍 영향받는 시스템
LoongArch 아키텍처를 사용하는 Linux 커널 기반 시스템 (KVM 사용 시)
⚔️ 공격 벡터
가상 머신(VM) 파일 디스크립터를 보유한 프로세스가 조작된 MSI 데이터를 KVM 인터페이스를 통해 전달
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 MSI 데이터 검증 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인