🔍 CVE-2024-43892

7.8
CVSS Score
HIGH
2024-08-26
2026-08-04 11:19
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 memcg(메모리 컨트롤 그룹) 관리 과정에서 idr_remove() 함수가 동시성 제어 없이 실행되어 발생하는 레이스 컨디션 취약점입니다. 이로 인해 서로 다른 memcg가 동일한 ID를 할당받거나 유효하지 않은 ID가 생성되어 커널 크래시(Panic)를 유발할 수 있습니다.

💡 쉬운 설명

여러 작업이 동시에 메모리 관리 번호를 수정하려고 할 때, 번호표가 꼬이는 문제가 발생합니다. 이로 인해 컴퓨터 시스템이 갑자기 멈추거나 오류가 발생하며 꺼질 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: memcg: protect concurrent access to mem_cgroup_idr Commit 73f576c04b94 ("mm: memcontrol: fix cgroup creation failure after many small jobs") decoupled the memcg IDs from the CSS ID space to fix the cgroup creation failures. It introduced IDR to maintain the memcg ID space. The IDR depends on external synchronization mechanisms for modifications. For the mem_cgroup_idr, the idr_alloc() and idr_replace() happen within css callback and thus are protected through cgroup_mutex from concurrent modifications. However idr_remove() for mem_cgroup_idr was not protected against concurrency and can be run concurrently for different memcgs when they hit their refcnt to zero. Fix that. We have been seeing list_lru based kernel crashes at a low frequency in our fleet for a long time. These crashes were in different part of list_lru code including list_lru_add(), list_lru_del() and reparenting code. Upon further inspection, it looked like for a given object (dentry and inode), the super_block's list_lru didn't have list_lru_one for the memcg of that object. The initial suspicions were either the object is not allocated through kmem_cache_alloc_lru() or somehow memcg_list_lru_alloc() failed to allocate list_lru_one() for a memcg but returned success. No evidence were found for these cases. Looking more deeply, we started seeing situations where valid memcg's id is not present in mem_cgroup_idr and in some cases multiple valid memcgs have same id and mem_cgroup_idr is pointing to one of them. So, the most reasonable explanation is that these situations can happen due to race between multiple idr_remove() calls or race between idr_alloc()/idr_replace() and idr_remove(). These races are causing multiple memcgs to acquire the same ID and then offlining of one of them would cleanup list_lrus on the system for all of them. Later access from other memcgs to the list_lru cause crashes due to missing list_lru_one.

📍 영향받는 시스템

Linux Kernel (memcg IDR 동시성 제어 미흡 버전)

⚔️ 공격 벡터

로컬 사용자가 다수의 메모리 컨트롤 그룹을 빈번하게 생성 및 삭제하여 레이스 컨디션을 유도함

🛡️ 대응 방법

리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 mem_cgroup_idr에 대한 동기화 메커니즘을 적용해야 함

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.

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