🔍 CVE-2026-46025

4.7
CVSS Score
MEDIUM
2026-05-27
2026-06-16 15:54
✅ 완료

🇰🇷 한글 설명

Linux 커널의 DAMON(Data Access Monitor) 구성 요소에서 kdamond 스레드 종료 시 발생하는 레이스 컨디션 취약점입니다. damon_call() 함수와 kdamond 종료 과정이 서로 다른 뮤텍스로 보호되어 있어, 요청 등록과 종료 상태 확인 사이에 충돌이 발생할 수 있습니다. 이로 인해 메모리 누수 또는 시스템 데드락(교착 상태)이 발생할 수 있습니다.

💡 쉬운 설명

리눅스 시스템의 데이터 모니터링 기능이 종료되는 순간에 새로운 작업 요청이 들어오면, 시스템이 응답하지 않고 멈추거나 메모리가 낭비되는 문제가 있습니다. 작업이 끝나는 중인지 확인하는 과정에서 순서가 어긋나 발생하는 오류입니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: mm/damon/core: fix damon_call() vs kdamond_fn() exit race Patch series "mm/damon/core: fix damon_call()/damos_walk() vs kdmond exit race". damon_call() and damos_walk() can leak memory and/or deadlock when they race with kdamond terminations. Fix those. This patch (of 2); When kdamond_fn() main loop is finished, the function cancels all remaining damon_call() requests and unset the damon_ctx->kdamond so that API callers and API functions themselves can know the context is terminated. damon_call() adds the caller's request to the queue first. After that, it shows if the kdamond of the damon_ctx is still running (damon_ctx->kdamond is set). Only if the kdamond is running, damon_call() starts waiting for the kdamond's handling of the newly added request. The damon_call() requests registration and damon_ctx->kdamond unset are protected by different mutexes, though. Hence, damon_call() could race with damon_ctx->kdamond unset, and result in deadlocks. For example, let's suppose kdamond successfully finished the damon_call() requests cancelling. Right after that, damon_call() is called for the context. It registers the new request, and shows the context is still running, because damon_ctx->kdamond unset is not yet done. Hence the damon_call() caller starts waiting for the handling of the request. However, the kdamond is already on the termination steps, so it never handles the new request. As a result, the damon_call() caller threads infinitely waits. Fix this by introducing another damon_ctx field, namely call_controls_obsolete. It is protected by the damon_ctx->call_controls_lock, which protects damon_call() requests registration. Initialize (unset) it in kdamond_fn() before letting damon_start() returns and set it just before the cancelling of remaining damon_call() requests is executed. damon_call() reads the obsolete field under the lock and avoids adding a new request. After this change, only requests that are guaranteed to be handled or cancelled are registered. Hence the after-registration DAMON context termination check is no longer needed. Remove it together. Note that the deadlock will not happen when damon_call() is called for repeat mode request. In tis case, damon_call() returns instead of waiting for the handling when the request registration succeeds and it shows the kdamond is running. However, if the request also has dealloc_on_cancel, the request memory would be leaked. The issue is found by sashiko [1].

📍 영향받는 시스템

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

⚔️ 공격 벡터

로컬 사용자가 DAMON API를 호출하여 특정 타이밍에 레이스 컨디션을 유도함으로써 데드락 또는 메모리 누수 유발

🛡️ 대응 방법

DAMON 관련 커널 패치(mm/damon/core: fix damon_call() vs kdamond_fn() exit race)를 적용하여 커널 업데이트

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.

Shell / Script
uname -r

📊 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