🇰🇷 한글 설명
리눅스 커널의 dma-buf CMA 힙 결함 처리기에서 오프바이원(off-by-one) 오류가 발견되었습니다. mremap을 통해 버퍼 크기보다 큰 매핑을 획득할 수 있으며, 이 과정에서 경계 검사 오류로 인해 페이지 배열의 끝을 넘어 임의의 페이지를 매핑에 삽입할 수 있습니다.
💡 쉬운 설명
메모리를 관리하는 과정에서 경계선을 잘못 계산하여, 허용되지 않은 메모리 영역에 접근할 수 있는 보안 취약점입니다. 공격자가 이를 악용하면 시스템의 중요한 데이터가 담긴 메모리 영역을 몰래 들여다보거나 조작할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dma-buf: heaps: Fix off-by-one in CMA heap fault handler
Until VM_DONTEXPAND was added in commit 1c1914d6e8c6 ("dma-buf: heaps:
Don't track CMA dma-buf pages under RssFile") it was possible to obtain
a mapping larger than the buffer size via mremap and bypass the overflow
check in dma_buf_mmap_internal. When using such a mapping to attempt to
fault past the end of the buffer, the CMA heap fault handler also checks
the fault offset against the buffer size, but gets the boundary wrong by
1. Fix the boundary check so that we don't read off the end of the pages
array and insert an arbitrary page in the mapping.
📍 영향받는 시스템
VM_DONTEXPAND 플래그가 적용되기 전 버전의 리눅스 커널 (CMA heap 사용 시)
⚔️ 공격 벡터
mremap을 이용한 버퍼 크기 초과 매핑 및 CMA 힙 결함 처리기의 경계 검사 오류 악용
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 패치 버전인지 확인하십시오.