🇰🇷 한글 설명
리눅스 커널의 mm/madvise 구성 요소에서 device-private PMD를 처리할 때 발생하는 취약점입니다. 특정 조건에서 PMD 상태를 잘못 판단하여 VM_BUG_ON()을 트리거함으로써 시스템 패닉(커널 크래시)을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 과정에서 특정 장치 전용 메모리 정보를 잘못 처리하여 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. GPU와 메모리 관리 기능이 충돌할 때 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/madvise: skip device-private PMDs in cold and pageout walks
madvise_cold_or_pageout_pte_range() takes pmd_trans_huge_lock(), whose
pmd_is_huge() check returns true for a device-private PMD. The subsequent
!pmd_present() branch has a VM_BUG_ON() asserting migration is the only
allowed non-present case; a device-private PMD trips it.
Skip device-private PMDs in that non-present branch and continue to
huge_unlock 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_COLD)/MADV_PAGEOUT: pmd_trans_huge(*pmd) reads true, then
migrate_vma_pages() flips the PMD to a device-private entry before the PMD
lock is acquired.
📍 영향받는 시스템
HMM(Heterogeneous Memory Management) 기반 GPU 드라이버를 사용하는 리눅스 커널 시스템
⚔️ 공격 벡터
HMM 기반 GPU 드라이버와 madvise(MADV_COLD/MADV_PAGEOUT) 호출 간의 레이스 컨디션(Race Condition) 유발
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 리눅스 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 패치된 버전인지 보안 공지(Security Advisory)와 대조하십시오.