🔍 CVE-2025-40272

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

🇰🇷 한글 설명

Linux 커널의 mm/secretmem 구성 요소에서 fault handler 처리 중 Use-After-Free 레이스 컨디션 취약점이 발견되었습니다. 두 작업이 동시에 페이지 폴트를 발생시킬 때, 메모리 페이지를 직접 매핑(direct map)에 복구하기 전에 먼저 해제함으로써 메모리 관리 오류가 발생할 수 있습니다.

💡 쉬운 설명

두 명의 사용자가 동시에 특수한 비밀 메모리에 접근하려고 할 때, 컴퓨터가 메모리를 정리하는 순서가 잘못되어 발생하는 문제입니다. 이 과정에서 이미 사용 중인 메모리를 시스템이 잘못 건드려 오류나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: mm/secretmem: fix use-after-free race in fault handler When a page fault occurs in a secret memory file created with `memfd_secret(2)`, the kernel will allocate a new folio for it, mark the underlying page as not-present in the direct map, and add it to the file mapping. If two tasks cause a fault in the same page concurrently, both could end up allocating a folio and removing the page from the direct map, but only one would succeed in adding the folio to the file mapping. The task that failed undoes the effects of its attempt by (a) freeing the folio again and (b) putting the page back into the direct map. However, by doing these two operations in this order, the page becomes available to the allocator again before it is placed back in the direct mapping. If another task attempts to allocate the page between (a) and (b), and the kernel tries to access it via the direct map, it would result in a supervisor not-present page fault. Fix the ordering to restore the direct map before the folio is freed.

📍 영향받는 시스템

Linux Kernel (memfd_secret 기능이 포함된 버전)

⚔️ 공격 벡터

두 개 이상의 프로세스가 동시에 memfd_secret로 생성된 메모리 영역에 페이지 폴트를 유발하는 레이스 컨디션 공격

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 메모리 해제 및 매핑 복구 순서를 수정해야 합니다.

🔧 검증 코드

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

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