🇰🇷 한글 설명
Linux 커널의 mm/hugetlb 구성 요소에서 CONFIG_DEBUG_VM 설정이 활성화된 경우 부팅 중 패닉(Panic)이 발생할 수 있는 취약점입니다. bootmem HugeTLB 페이지 처리 과정에서 초기화되지 않은 공유 테일 페이지를 참조하여 발생하는 문제입니다.
💡 쉬운 설명
컴퓨터가 켜지는 초기 단계에서 메모리를 관리하는 특정 기능이 잘못된 정보를 참조하여 시스템이 갑자기 멈추거나 꺼지는 현상입니다. 이는 시스템 보안 공격보다는 시스템 안정성에 영향을 주는 오류에 가깝습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/hugetlb: fix boot panic with CONFIG_DEBUG_VM and HVO bootmem pages
Patch series "mm: Refactor bootmem gigantic hugepage allocation", v4.
This series is split out from the earlier larger series "mm: Generalize
HVO for HugeTLB and device DAX" [1]. It collects the first 19 patches of
that series as a standalone set of fixes and preparatory cleanups around
bootmem HugeTLB handling, sparse initialization ordering, and related
vmemmap setup.
The first patches fix a few bugs found while reviewing the existing code,
including incorrect bootmem HVO handling, wrong vmemmap registration
arguments, a powerpc compound-vmemmap tracking bug, and too-late
initialization of gigantic bootmem HugeTLB struct pages.
The rest of the series reorders early memory initialization so the
relevant zone state is available before sparse and HugeTLB boot-time setup
runs, then simplifies the remaining bootmem gigantic hugepage allocation
path and removes code made obsolete by that rework.
At a high level:
- patches [1-4] fix boot-time and arch-specific bugs
- patches [5-12] reorder and simplify sparse/mm/hugetlb early init
- patches [13-19] refactor bootmem gigantic hugepage allocation and
remove obsolete helpers and state
This patch (of 19):
Commit 622026e87c40 ("mm/hugetlb: remove fake head pages") switched
HVO to reuse per-zone shared tail pages from zone->vmemmap_tails[].
Those shared tail pages were initialized in hugetlb_vmemmap_init(), but
bootmem HugeTLB folios are prepared earlier from
gather_bootmem_prealloc(). With hugetlb_free_vmemmap=on,
prep_and_add_bootmem_folios() can access pageblock flags on bootmem
HugeTLB pages whose mirrored tail struct pages already point to the shared
tail page. On CONFIG_DEBUG_VM kernels, get_pfnblock_bitmap_bitidx() then
dereferences the still-uninitialized shared tail page and can panic during
boot.
Initialize zone->vmemmap_tails[] from gather_bootmem_prealloc(), before
bootmem HugeTLB folios are processed, and drop the later initialization
from hugetlb_vmemmap_init().
This bug only affects CONFIG_DEBUG_VM kernels, where the relevant
assertion is evaluated.
📍 영향받는 시스템
CONFIG_DEBUG_VM 옵션이 활성화된 Linux 커널 (bootmem HugeTLB 사용 시)
⚔️ 공격 벡터
로컬/물리적 접근 (부팅 과정에서의 시스템 중단 유발)
🛡️ 대응 방법
해당 수정 사항이 포함된 최신 Linux 커널 버전으로 업데이트하거나 CONFIG_DEBUG_VM 설정을 비활성화합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전이 적용되었는지 확인합니다.