🇰🇷 한글 설명
리눅스 커널의 perf/core 구성 요소에서 attach_perf_ctx_data() 함수 호출 시 발생하는 참조 횟수(refcount) 누수 취약점입니다. 전역(global) 설정과 비전역 설정이 동시에 처리될 때 경쟁 상태(race condition)가 발생하여, 참조 횟수가 제대로 관리되지 않아 메모리 누수가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 성능을 측정하는 기능에서 데이터 관리 번호가 제대로 지워지지 않아 메모리가 계속 쌓이는 문제입니다. 이로 인해 시스템의 메모리가 점차 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
perf/core: Fix a refcount leak in attach_perf_ctx_data()
The attach_perf_ctx_data() can race on global and !global cases. The
global case is protected by global_ctx_data_rwsem and shares a single
reference count using perf_ctx_data.global field.
But when it races with !global case, it may miss to set the global field
and result in a reference count leak.
CPU1 CPU2
----------------------------------------------------------------
attach_task_ctx_data(.global=1) attach_task_ctx_data(.global=0)
cd1 = alloc_perf_ctx_data(); cd2 = alloc_perf_ctx_data();
// { .global = 0, .refcount = 1 };
try_cmpxchg(); // success,
// task->perf_ctx_data = cd2
try_cmpxhg(); // fail; old = cd2
refcount_inc_not_zero(&old->refcount); // success
// old.refcount = 2
free_perf_ctx_data(cd1);
Then later detach_global_ctx_data() will see the data but it's not
marked as global, so it won't call detach_task_ctx_data().
📍 영향받는 시스템
Linux Kernel (perf/core 모듈을 사용하는 모든 버전)
⚔️ 공격 벡터
로컬 사용자가 특정 시스템 호출을 반복적으로 수행하여 경쟁 상태를 유도함으로써 메모리 누수를 유발할 수 있음
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인하십시오.