🔍 CVE-2025-38681

4.7
CVSS Score
MEDIUM
2025-09-04
2026-10-19 21:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 ptdump 코드가 메모리 핫리무브 작업과 동시에 실행될 때 발생하는 경합 조건으로, 이미 해제된 메모리에 접근하여 커널 패닉이나 시스템 불안정을 초래할 수 있습니다. 메모리 핫플러그 락을 ptdump 함수 내부에서 획득하여 경합을 방지합니다.

💡 쉬운 설명

Linux 커널이 메모리를 분석할 때와 메모리를 제거할 때 동시에 실행되면 이미 지워진 메모리에 접근해서 시스템이 멈출 수 있습니다. 이를 방지하기 위해 분석 중에는 메모리 제거를 잠깐 멈추도록 수정했습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: mm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd() Memory hot remove unmaps and tears down various kernel page table regions as required. The ptdump code can race with concurrent modifications of the kernel page tables. When leaf entries are modified concurrently, the dump code may log stale or inconsistent information for a VA range, but this is otherwise not harmful. But when intermediate levels of kernel page table are freed, the dump code will continue to use memory that has been freed and potentially reallocated for another purpose. In such cases, the ptdump code may dereference bogus addresses, leading to a number of potential problems. To avoid the above mentioned race condition, platforms such as arm64, riscv and s390 take memory hotplug lock, while dumping kernel page table via the sysfs interface /sys/kernel/debug/kernel_page_tables. Similar race condition exists while checking for pages that might have been marked W+X via /sys/kernel/debug/kernel_page_tables/check_wx_pages which in turn calls ptdump_check_wx(). Instead of solving this race condition again, let's just move the memory hotplug lock inside generic ptdump_check_wx() which will benefit both the scenarios. Drop get_online_mems() and put_online_mems() combination from all existing platform ptdump code paths.

📍 영향받는 시스템

Linux 커널 모든 버전 (arm64, riscv, s390 등 모든 아키텍처)

⚔️ 공격 벡터

로컬 접근을 통해 /sys/kernel/debug/kernel_page_tables 인터페이스를 읽으면서 동시에 메모리 핫리무브를 트리거하여 커널 패닉 유발

🛡️ 대응 방법

Linux 커널을 ptdump 메모리 락 개선사항이 포함된 버전으로 업데이트

🔧 검증 코드

현재 커널 버전을 확인하고 메모리 핫플러그 기능이 활성화된 경우 커널 업데이트 필요 여부를 확인합니다

Shell / Script
uname -r && grep -i 'memory hotplug' /boot/config-$(uname -r) 2>/dev/null | head -1

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel