🇰🇷 한글 설명
리눅스 커널의 mm/migrate_device 모듈에서 컴파운드 폴리오(compound folio) 처리 시 경계 검사가 누락되어 발생하는 취약점입니다. 특정 조건에서 migrate_device_range() 함수가 할당된 배열의 범위를 벗어나 데이터를 쓰는 Out-of-bounds write 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리를 옮기는 과정에서 데이터가 들어갈 공간보다 더 많은 양을 쓰려고 시도하여 시스템 오류를 일으킬 수 있는 문제입니다. 이로 인해 시스템이 멈추거나 보안 공격에 악용될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/migrate_device: avoid out-of-bounds writes for compound folios
migrate_device_range() and migrate_device_pfns() clear the entries
following a compound folio so that the PFN arrays retain their
page-granular representation.
If a compound folio extends beyond the end of the caller-provided range,
the loops clear all following folio entries without limiting them to the
number of slots remaining in the npages-sized array, causing an
out-of-bounds write.
Do not proceed with a compound folio if its page-granular representation
does not fit entirely in the remaining PFN array. If this happens, drop
any reference and lock acquired for the folio, clear the remaining
entries, and stop collecting.
Observed with a KASAN x86 QEMU kernel using the HMM migrate_anon_huge_zero
selftest. Closing /dev/hmm_dmirror0 after migrating an anonymous huge
page to device memory exercises:
dmirror_fops_release()
-> dmirror_device_evict_chunk()
-> migrate_device_range()
📍 영향받는 시스템
Linux Kernel (mm/migrate_device 관련 모듈을 사용하는 시스템)
⚔️ 공격 벡터
HMM(Heterogeneous Memory Management)을 통한 익명 거대 페이지(anonymous huge page)를 장치 메모리로 마이그레이션하는 과정에서 유도 가능
🛡️ 대응 방법
해당 취약점이 수정된 최신 리눅스 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 패치된 최신 버전인지 확인