🇰🇷 한글 설명
Linux 커널의 hugetlbfs 구현 중 mmap_prepare 단계에서 hugetlb VMA 잠금(lock) 할당을 잘못 처리하여 잠금이 해제되지 않고 누수되는 취약점이 발견되었습니다. 이 문제는 특정 커밋의 변경 사항으로 인해 발생했으며, 이를 해결하기 위해 해당 변경 사항을 되돌리는 패치가 적용되었습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 과정에서 자물쇠를 채운 뒤 제대로 풀지 못해 메모리 자원이 낭비되는 문제가 있었습니다. 이로 인해 시스템의 메모리가 점차 부족해질 수 있는 결함입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Revert "mm/hugetlbfs: update hugetlbfs to use mmap_prepare"
This reverts commit ea52cb24cd3f ("mm/hugetlbfs: update hugetlbfs to use
mmap_prepare") with conflict resolution to account for changes in commit
ea52cb24cd3f ("mm/hugetlbfs: update hugetlbfs to use mmap_prepare").
The patch incorrectly handled hugetlb VMA lock allocation at the
mmap_prepare stage, where a failed allocation occurring after mmap_prepare
is called might result in the lock leaking.
There is no risk of a merge causing a similar issues, as
VMA_DONTEXPAND_BIT is set for hugetlb mappings.
As a first step in addressing this issue, simply revert the change so we
can rework how we do this having corrected the underlying issues.
We maintain the VMA flags changes as best we can, accounting for the fact
that we were working with a VMA descriptor previously and propagating
like-for-like changes for this.
Note that we invoke vma_set_flags() and do not call vma_start_write() as
vm_flags_set() does. This is OK as it's being done in an .mmap hook where
the VMA is not yet linked into the tree so nobody else can be accessing
it.
📍 영향받는 시스템
hugetlbfs를 사용하는 Linux 커널 버전 (특정 커밋 ea52cb24cd3f 포함 버전)
⚔️ 공격 벡터
메모리 할당 실패를 유도하여 커널 내 VMA 잠금 누수를 일으키는 방식
🛡️ 대응 방법
해당 취약점이 해결된 최신 Linux 커널 버전으로 업데이트하거나 관련 패치를 적용하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 취약한 커밋이 포함된 버전인지 또는 패치가 적용된 최신 버전인지 확인합니다.