🇰🇷 한글 설명
Linux 커널의 mm/huge_memory 구성 요소에서 madvise_free_huge_pmd 함수가 디바이스 전용 PMD를 적절히 처리하지 못해 발생하는 취약점입니다. HMM 기반 GPU 드라이버와 madvise(MADV_FREE) 호출 간의 레이스 컨디션이 발생할 경우 시스템 패닉이 유발될 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 과정에서 특정 장치(GPU 등)와 메모리를 주고받을 때 충돌이 발생할 수 있는 문제입니다. 이 충돌이 발생하면 컴퓨터 시스템이 갑자기 멈추거나 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/huge_memory: skip device-private PMDs in madvise_free_huge_pmd
madvise_free_pte_range() checks pmd_trans_huge(*pmd) unlocked, then
madvise_free_huge_pmd() takes pmd_trans_huge_lock(). pmd_is_huge()
returns true for a device-private PMD, so orig_pmd can be device-private
and enter the !pmd_present() branch.
Skip device-private PMDs in that non-present branch and continue to out
before calling pmd_folio(). Downgrade the check to VM_WARN_ON_ONCE() so
an unexpected PMD softleaf logs a warning rather than panicking. Drop the
thp_migration_supported() guard: it expands to
IS_ENABLED(CONFIG_ARCH_SUPPORTS_PMD_SOFTLEAF), and both
pmd_is_migration_entry() and pmd_is_device_private_entry() already return
false when that config is not selected, so the guard suppresses only the
case where the warning would already be silent.
Potential trigger: an HMM-based GPU driver races with madvise(MADV_FREE):
migrate_vma_pages() flips the PMD to a device-private entry between the
caller's pmd_trans_huge() check and the callee's pmd_trans_huge_lock().
📍 영향받는 시스템
HMM(Heterogeneous Memory Management) 기반 GPU 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
HMM 기반 GPU 드라이버와 madvise(MADV_FREE) 시스템 호출 간의 레이스 컨디션 유도
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 패치가 적용된 보안 업데이트 버전인지 확인