🇰🇷 한글 설명
Linux 커널의 DAMON(Data Access Monitor) 기능 중 hugetlb 관련 함수에서 페이지 테이블 엔트리(PTE)를 업데이트할 때 하드웨어의 병렬 업데이트를 무시할 수 있는 취약점이 발견되었습니다. 이로 인해 하드웨어가 설정한 dirty bit과 같은 중요한 정보가 손실될 위험이 있습니다.
💡 쉬운 설명
컴퓨터가 메모리 정보를 기록하는 과정에서, 하드웨어가 동시에 기록한 중요한 데이터가 소프트웨어의 실수로 덮어씌워져 사라질 수 있는 문제입니다. 다행히 메모리 관리 방식의 특성상 시스템 전체에 치명적인 영향을 줄 가능성은 낮습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/vaddr: avoid hw-driven pte updates during damon_hugetlb_mkold()
damon_hugetlb_mkold() reads the page table entry into a local variable,
unsets the accessed bit in the variable, and updates the page table entry
with the updated variable value. If hardware updates the same page table
entry in parallel, the hw updates could be lost. For example,
hardware-updated dirty bits might be lost.
Avoid the parallel updates by clearing the page table entry when reading
it together, using huge_ptep_get_and_clear(). If a parallel write to the
memory is made after the clearing, the hw will see the page table entry is
cleared, trigger page fault and wait until it is handled. The page fault
handling will wait for damon_hugetlb_mkold() due to the page table lock.
Because hugetlbfs is an in-memory file system and hugetlb pages cannot be
reclaimed, no critical issue is expected to my best knowledge. But
definitely this is a nasty bug that should be fixed sooner rather than
later.
The issue was discovered [1] by Sashiko.
📍 영향받는 시스템
Linux kernel (DAMON/hugetlb 관련 모듈 사용 시)
⚔️ 공격 벡터
로컬 시스템에서 메모리 관리 메커니즘을 이용한 데이터 무결성 손실 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인