🇰🇷 한글 설명
Linux 커널의 PCI 하이퍼-V 드라이버에서 hv_pci_probe() 실패 시 도메인 번호가 두 번 해제되는 이중 ida_free 취약점입니다. 이로 인해 같은 ID를 중복 해제하려다 경고와 시스템 불안정성이 발생합니다.
💡 쉬운 설명
메모리 정리 과정에서 같은 자원을 두 번 해제하려는 버그입니다. 시스템 경고와 잠재적 불안정성을 초래할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
PCI: hv: Fix double ida_free in hv_pci_probe error path
If hv_pci_probe() fails after storing the domain number in
hbus->bridge->domain_nr, there is a call to free this domain_nr via
pci_bus_release_emul_domain_nr(), however, during cleanup, the bridge
release callback pci_release_host_bridge_dev() also frees the domain_nr
causing ida_free to be called on same ID twice and triggering following
warning:
ida_free called for id=28971 which is not allocated.
WARNING: lib/idr.c:594 at ida_free+0xdf/0x160, CPU#0: kworker/0:2/198
Call Trace:
pci_bus_release_emul_domain_nr+0x17/0x20
pci_release_host_bridge_dev+0x4b/0x60
device_release+0x3b/0xa0
kobject_put+0x8e/0x220
devm_pci_alloc_host_bridge_release+0xe/0x20
devres_release_all+0x9a/0xd0
device_unbind_cleanup+0x12/0xa0
really_probe+0x1c5/0x3f0
vmbus_add_channel_work+0x135/0x1a0
Fix this by letting pci core handle the free domain_nr and remove
the explicit free called in pci-hyperv driver.
📍 영향받는 시스템
Linux kernel hyperv PCI driver (hv_pci)
⚔️ 공격 벡터
hv_pci_probe() 실패 시 자동 트리거되는 로컬 메모리 관리 결함
🛡️ 대응 방법
커널 패치 적용으로 PCI 코어에 domain_nr 해제 권한 위임
🔧 검증 코드
0이 출력되면 취약점이 없거나 패치된 상태. 1 이상이면 취약점 존재
dmesg | grep -i 'ida_free called for id' | wc -l