🇰🇷 한글 설명
Linux 커널의 s390/cpum_sf 구성 요소에서 PMU 하드웨어 예약 후 메모리 할당 과정이 뮤텍스(mutex) 보호를 받지 않아 발생하는 취약점입니다. 이로 인해 여러 개의 perf_event_init() 호출이 동시에 실행될 경우 동일한 PMU에 대해 샘플 데이터 블록(SDB)이 중복 할당될 수 있습니다.
💡 쉬운 설명
여러 작업이 동시에 하드웨어 자원을 요청할 때 이를 순서대로 제어하는 장치가 없어 메모리가 중복으로 할당되는 문제입니다. 이로 인해 시스템의 메모리 관리 오류나 불안정성이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
s390/cpum_sf: Fix and protect memory allocation of SDBs with mutex
Reservation of the PMU hardware is done at first event creation
and is protected by a pair of mutex_lock() and mutex_unlock().
After reservation of the PMU hardware the memory
required for the PMUs the event is to be installed on is
allocated by allocate_buffers() and alloc_sampling_buffer().
This done outside of the mutex protection.
Without mutex protection two or more concurrent invocations of
perf_event_init() may run in parallel.
This can lead to allocation of Sample Data Blocks (SDBs)
multiple times for the same PMU.
Prevent this and protect memory allocation of SDBs by
mutex.
📍 영향받는 시스템
s390 아키텍처를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
동시에 여러 개의 성능 이벤트(perf_event)를 생성하여 메모리 할당 로직의 경쟁 상태(Race Condition) 유도
🛡️ 대응 방법
뮤텍스 보호가 적용된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 이후의 버전인지 확인