🔍 CVE-2025-40270

7.8
CVSS Score
HIGH
2025-12-06
2026-10-15 19:10
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 mm, swap 구성 요소에서 VMA readahead 과정 중 발생할 수 있는 Use-After-Free(UAF) 취약점이 발견되었습니다. 특정 스왑 장치에서 swapoff가 수행되는 동안 다른 장치의 스왑 엔트리를 읽으려 할 때 참조 카운트 관리 오류로 인해 메모리 오류가 발생할 수 있습니다.

💡 쉬운 설명

컴퓨터가 메모리가 부족할 때 하드디스크를 메모리처럼 사용하는 과정에서, 사용 중인 장치를 갑자기 제거할 때 발생하는 오류입니다. 이 오류를 이용하면 시스템이 비정상적으로 종료되거나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: mm, swap: fix potential UAF issue for VMA readahead Since commit 78524b05f1a3 ("mm, swap: avoid redundant swap device pinning"), the common helper for allocating and preparing a folio in the swap cache layer no longer tries to get a swap device reference internally, because all callers of __read_swap_cache_async are already holding a swap entry reference. The repeated swap device pinning isn't needed on the same swap device. Caller of VMA readahead is also holding a reference to the target entry's swap device, but VMA readahead walks the page table, so it might encounter swap entries from other devices, and call __read_swap_cache_async on another device without holding a reference to it. So it is possible to cause a UAF when swapoff of device A raced with swapin on device B, and VMA readahead tries to read swap entries from device A. It's not easy to trigger, but in theory, it could cause real issues. Make VMA readahead try to get the device reference first if the swap device is a different one from the target entry.

📍 영향받는 시스템

Linux Kernel (VMA readahead 관련 스왑 캐시 로직을 사용하는 버전)

⚔️ 공격 벡터

스왑 장치 A의 swapoff와 장치 B의 swapin이 동시에 발생하는 레이스 컨디션 상황을 유도하여 메모리 참조 오류 유발

🛡️ 대응 방법

리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 VMA readahead의 스왑 장치 참조 로직을 수정해야 합니다.

🔧 검증 코드

출력된 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel