🔍 CVE-2025-39737

5.5
CVSS Score
MEDIUM
2025-09-11
2026-11-05 22:17
✅ 완료

🇰🇷 한글 설명

Linux 커널 kmemleak 모듈의 __kmemleak_do_cleanup() 함수에서 대량의 객체를 처리할 때 CPU 스케줄링 없이 지속적으로 실행되어 soft lockup을 유발하는 취약점입니다. 메모리 언플러그 작업 중 kmemleak 비활성화 시 40,000개 이상의 객체를 루프로 처리하면서 33초 이상 CPU를 점유합니다.

💡 쉬운 설명

리눅스 커널의 메모리 누수 감지 도구가 정리 작업 중 CPU를 너무 오래 독점하여 시스템이 응답하지 않는 문제입니다. 주기적으로 다른 작업에 CPU를 양보하는 방식으로 수정되었습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: mm/kmemleak: avoid soft lockup in __kmemleak_do_cleanup() A soft lockup warning was observed on a relative small system x86-64 system with 16 GB of memory when running a debug kernel with kmemleak enabled. watchdog: BUG: soft lockup - CPU#8 stuck for 33s! [kworker/8:1:134] The test system was running a workload with hot unplug happening in parallel. Then kemleak decided to disable itself due to its inability to allocate more kmemleak objects. The debug kernel has its CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE set to 40,000. The soft lockup happened in kmemleak_do_cleanup() when the existing kmemleak objects were being removed and deleted one-by-one in a loop via a workqueue. In this particular case, there are at least 40,000 objects that need to be processed and given the slowness of a debug kernel and the fact that a raw_spinlock has to be acquired and released in __delete_object(), it could take a while to properly handle all these objects. As kmemleak has been disabled in this case, the object removal and deletion process can be further optimized as locking isn't really needed. However, it is probably not worth the effort to optimize for such an edge case that should rarely happen. So the simple solution is to call cond_resched() at periodic interval in the iteration loop to avoid soft lockup.

📍 영향받는 시스템

Linux 커널 (CONFIG_DEBUG_KMEMLEAK 활성화된 디버그 빌드, 특히 메모리 풀 크기가 40,000 이상인 경우)

⚔️ 공격 벡터

로컬 공격자가 메모리 핫 언플러그를 병렬로 반복 실행하여 kmemleak 자동 비활성화를 트리거하고 정리 루틴 실행 중 soft lockup 발생

🛡️ 대응 방법

Linux 커널을 최신 버전으로 업데이트하여 cond_resched() 주기 호출 패치 적용

🔧 검증 코드

명령어가 'Kmemleak enabled'를 반환하면 취약할 수 있으며 커널 버전을 확인하여 패치 여부를 확인해야 합니다.

Shell / Script
grep -w CONFIG_DEBUG_KMEMLEAK /boot/config-$(uname -r) | grep -q y && echo 'Kmemleak enabled' || echo 'Kmemleak disabled or not found'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel