🇰🇷 한글 설명
Linux 커널의 swiotlb 구성 요소에서 동적 풀을 위한 가상 주소 할당 방식에 오류가 발견되었습니다. CONFIG_DMA_DIRECT_REMAP 설정 시 물리 주소를 기반으로 가상 주소를 재구성하는 과정에서 잘못된 주소가 저장되어, 메모리 해제 시 해당 청크를 인식하지 못하는 문제가 발생합니다.
💡 쉬운 설명
컴퓨터가 메모리를 빌려 쓰고 나서 다시 돌려줄 때, 빌렸던 주소를 잘못 기억하여 메모리를 제대로 반납하지 못하는 버그입니다. 이로 인해 시스템의 메모리 관리에 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
swiotlb: Preserve allocation virtual address for dynamic pools
swiotlb_alloc_tlb() can allocate from the DMA atomic pool when a decrypted
pool is needed from atomic context. With CONFIG_DMA_DIRECT_REMAP, the
atomic pool is backed by remapped virtual addresses, which are not the same
as the direct-map addresses returned by phys_to_virt().
swiotlb_init_io_tlb_pool() currently reconstructs the pool virtual address
from the physical start address. For atomic-pool backed allocations this
stores the wrong address in pool->vaddr. Later, swiotlb_free_tlb() passes
that address to dma_free_from_pool(), which will fail to recognize the
chunk
Pass the virtual address returned by the allocation path into
swiotlb_init_io_tlb_pool(), and store that address in pool->vaddr. This
keeps the pool free path using the same virtual address as the allocator.
📍 영향받는 시스템
CONFIG_DMA_DIRECT_REMAP가 활성화된 Linux 커널 버전
⚔️ 공격 벡터
직접적인 외부 공격보다는 시스템 메모리 누수 및 자원 고갈을 유발할 수 있는 로컬/커널 내부 오류
🛡️ 대응 방법
swiotlb_init_io_tlb_pool()이 할당 경로에서 반환된 가상 주소를 직접 사용하도록 수정된 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인