🔍 CVE-2025-38062

7.8
CVSS Score
HIGH
2025-06-18
2026-07-30 06:22
✅ 완료

🇰🇷 한글 설명

Linux 커널의 genirq/msi 구성 요소에서 IOMMU IOVA를 처리하는 과정 중 Use-After-Free(UAF) 취약점이 발견되었습니다. iommufd를 사용하는 환경에서 IOMMU 도메인이 변경될 때 MSI 디스크립터에 저장된 쿠키 포인터가 유효하지 않은 메모리를 참조할 수 있는 문제가 있습니다.

💡 쉬운 설명

컴퓨터 부품이 신호를 보낼 때 사용하는 주소 정보를 저장하는 과정에서, 정보가 저장된 메모리 위치가 갑자기 바뀌어 버리는 오류가 있습니다. 이로 인해 시스템이 잘못된 메모리에 접근하여 보안 문제가 발생하거나 멈출 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie The IOMMU translation for MSI message addresses has been a 2-step process, separated in time: 1) iommu_dma_prepare_msi(): A cookie pointer containing the IOVA address is stored in the MSI descriptor when an MSI interrupt is allocated. 2) iommu_dma_compose_msi_msg(): this cookie pointer is used to compute a translated message address. This has an inherent lifetime problem for the pointer stored in the cookie that must remain valid between the two steps. However, there is no locking at the irq layer that helps protect the lifetime. Today, this works under the assumption that the iommu domain is not changed while MSI interrupts being programmed. This is true for normal DMA API users within the kernel, as the iommu domain is attached before the driver is probed and cannot be changed while a driver is attached. Classic VFIO type1 also prevented changing the iommu domain while VFIO was running as it does not support changing the "container" after starting up. However, iommufd has improved this so that the iommu domain can be changed during VFIO operation. This potentially allows userspace to directly race VFIO_DEVICE_ATTACH_IOMMUFD_PT (which calls iommu_attach_group()) and VFIO_DEVICE_SET_IRQS (which calls into iommu_dma_compose_msi_msg()). This potentially causes both the cookie pointer and the unlocked call to iommu_get_domain_for_dev() on the MSI translation path to become UAFs. Fix the MSI cookie UAF by removing the cookie pointer. The translated IOVA address is already known during iommu_dma_prepare_msi() and cannot change. Thus, it can simply be stored as an integer in the MSI descriptor. The other UAF related to iommu_get_domain_for_dev() will be addressed in patch "iommu: Make iommu_dma_prepare_msi() into a generic operation" by using the IOMMU group mutex.

📍 영향받는 시스템

iommufd를 사용하는 Linux 커널 기반 시스템 (VFIO 환경 포함)

⚔️ 공격 벡터

사용자 공간(Userspace)에서 VFIO 장치 부착과 인터럽트 설정 간의 레이스 컨디션을 유도하여 메모리 오류 발생

🛡️ 대응 방법

IOMMU IOVA를 포인터 대신 정수 형태로 직접 저장하도록 커널을 최신 버전으로 업데이트

🔧 검증 코드

출력된 커널 버전을 확인하여 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel