🇰🇷 한글 설명
Linux 커널의 mana 네트워크 드라이버에서 MSI-X 벡터 수가 실제 장치의 MSI-X 테이블 크기를 초과하여 할당될 수 있는 취약점이 발견되었습니다. 이로 인해 메모리 경계를 벗어난 인덱스 접근이 발생하여 페이지 폴트(Page Fault)와 함께 시스템 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
네트워크 장치가 처리할 수 있는 신호 개수보다 더 많은 신호를 처리하려고 시도하다가 컴퓨터 시스템이 멈추거나 오류가 발생하는 문제입니다. 장치의 실제 용량을 확인하지 않고 CPU 개수 등에 맞춰 무리하게 설정하기 때문에 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: mana: Cap MSI-X vectors to the device MSI-X table size
mana_gd_query_max_resources() sizes gc->num_msix_usable from resp.max_msix
and the CPU count, but never from the device MSI-X table. On a 1792 vCPU
M-series VM that yields 1793 while the table has 1024 entries, and
mana_gd_setup_remaining_irqs() then walks indices 1..1792, running off the
end of the region mapped by msix_map_region():
BUG: unable to handle page fault for address: ff8e347f8b99800c
RIP: 0010:msix_prepare_msi_desc+0x7a/0x90
RAX: 0000000000004000 RBX: ff4330cb164ea780 RCX: ff8e347f8b998000
Call Trace:
<TASK>
__msi_domain_alloc_irqs+0x13a/0x440
msi_domain_alloc_irq_at+0x149/0x1b0
mana_gd_setup+0x351/0x890
mana_gd_probe+0x274/0x390
</TASK>
RAX is index 1024 * PCI_MSIX_ENTRY_SIZE, one entry past the table.
msi_insert_desc() does range check the index, but only against the MSI
domain hwsize, which matches the table only for devices on an MSI parent
domain. With a global PCI/MSI domain hwsize is MSI_XA_DOMAIN_SIZE, so
nothing bounds the request.
Cap num_msix_usable with pci_msix_vec_count().
📍 영향받는 시스템
Linux kernel (mana driver 사용 환경)
⚔️ 공격 벡터
특정 구성의 가상 머신(VM) 환경에서 CPU 개수와 장치의 MSI-X 테이블 크기 차이를 이용한 시스템 장애 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 mana 드라이버의 MSI-X 벡터 제한 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.