🇰🇷 한글 설명
Linux 커널의 x86 메모리 관리 시스템에서 PMD 크기의 vmemmap 페이지를 해제할 때 발생하는 오류입니다. 기존에는 페이지 테이블 해제 함수를 vmemmap 페이지에 잘못 적용하여, 일부 페이지가 해제되지 않고 메모리 누수가 발생하는 문제가 있었습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 과정에서 사용이 끝난 메모리 공간을 제대로 돌려주지 못해 메모리가 조금씩 새어나가는 버그입니다. 이 문제가 지속되면 시스템의 메모리가 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
x86/mm: Fix freeing of PMD-sized vmemmap pages
Commit bf9e4e30f353 ("x86/mm: use pagetable_free()"), switched from
freeing non-boot page tables through __free_pages() to
pagetable_free().
However, the function is also called to free vmemmap pages.
Given that vmemmap pages are not page tables, already the page_ptdesc(page)
is wrong. But worse, pagetable_free() calls:
__free_pages(page, compound_order(page));
Since vmemmap pages are not compound pages (see vmemmap_alloc_block())
-- except for HVO, which doesn't apply here -- only first page of a
PMD-sized vmemmap page is freed, leaking the other ones.
Fix it by properly decoupling pagetable and vmemmap freeing.
free_pagetable() no longer has to mess with SECTION_INFO, as only the
vmemmap is marked like that in register_page_bootmem_memmap().
The indentation in remove_pmd_table() is messed up. Fix that while
touching it.
Bootmem info handling will soon be fixed up. For now, handle it
similar to free_pagetable(), just avoiding the ifdef.
[ dhansen: changelog munging. More imperative voice ]
📍 영향받는 시스템
x86 아키텍처를 사용하는 Linux 커널 (특정 패치 적용 전 버전)
⚔️ 공격 벡터
직접적인 외부 공격보다는 시스템 운영 중 메모리 자원이 점진적으로 고갈되는 방식의 서비스 거부(DoS) 유발 가능성
🛡️ 대응 방법
커널 패치(Commit bf9e4e30f353 포함)를 적용하여 vmemmap 해제 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인