🇰🇷 한글 설명
Linux 커널의 hugetlb 구현에서 unmapping 과정 중 mapcount가 0인 경우에만 예약(reservation)을 조정하도록 수정되었습니다. 부모와 자식 프로세스가 동일한 folio를 매핑한 상태에서 부모가 먼저 unmap할 경우 예약 카운트가 언더플로우(underflow)되는 취약점이 존재했습니다.
💡 쉬운 설명
메모리를 관리하는 과정에서 숫자가 잘못 계산되어 시스템의 메모리 관리 체계에 오류가 생길 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hugetlb: only adjust reservation during unmapping if mapcount is 0
Since df7a6d1f6405, __unmap_hugepage_range can adjust reservations. In
the case of folio mapped in both a parent and a child, if the parent
unmaps the range first, the reservation adjustment will result in an
underflow of the reserved count. Once the child unmaps the range, the
count is restored. Change __unmap_hugepage_range() to check the mapcount
before adjusting the reservation.
📍 영향받는 시스템
hugetlb를 사용하는 Linux 커널 (df7a6d1f6405 커밋 이전 버전)
⚔️ 공격 벡터
특정 메모리 매핑 및 해제 시퀀스를 유도하여 예약 카운트 언더플로우 유발
🛡️ 대응 방법
커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인