🇰🇷 한글 설명
Linux 커널의 mm/page_vma_mapped에서 디바이스 전용 PMD(Page Middle Directory) 처리 오류가 발견되었습니다. 이 취약점은 rmap 워크 과정에서 디바이스 전용 엔트리를 올바르게 처리하지 못해 메모리 오염을 유발하거나, THP(Transparent Huge Pages) 분할 시 레이스 컨디션(경쟁 상태)을 발생시킬 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 핵심 기능에서 특정 장치 전용 메모리 정보를 잘못 읽어 들여 데이터가 깨질 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 예상치 못한 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/page_vma_mapped: fix device-private PMD handling
Commit 65edfda6f3f2 ("mm/rmap: extend rmap and migration support
device-private entries") introduced the concept of device-private PMD
entries, but did not correctly update the rmap walk code to account for
them.
As a result, when page_vma_mapped_walk() encounters device-private PMD
entries, it takes no action other than to acquire the PMD lock and exit.
However this is highly problematic for two reasons - firstly, device
private entries possess a PFN so check_pmd() needs to be called to ensure
an overlapping PFN range.
Secondly, and more importantly, if PVMW_MIGRATION is set the caller
assumes the returned entry is a migration entry, resulting in memory
corruption when the caller tries to interpret the device private entry as
such.
In addition, commit 146287290023 ("mm/huge_memory: implement
device-private THP splitting") allowed device private PMDs to be split
like THP mappings, but again did not update this code path.
As a result, we might race a PMD split prior to acquiring the PMD lock.
This patch addresses all of these issues by invoking check_pmd(), ensuring
PMVW_MIGRATION is not set and checks whether a split raced us we do for
PMD THP and migration entries.
Instead of checking for a subset of the cases after taking the pmd_lock(),
put device-private along with pmd_trans_huge() and
pmd_is_migration_entry(). Also remove thp_migration_supported() as it is
already guarded by pmd_is_migration_entry().
[
[email protected]: fix Raspberry Pi 1 build, per David]
📍 영향받는 시스템
Linux Kernel (Commit 65edfda6f3f2 이후 버전 중 패치 적용 전 버전)
⚔️ 공격 벡터
로컬 공격자가 특정 메모리 관리 시나리오를 유도하여 메모리 오염 및 시스템 불안정 유발
🛡️ 대응 방법
커널 패치(Commit 65edfda6f3f2 관련 수정 사항 포함)를 적용하여 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux