🔍 CVE-2024-57849

7.8
CVSS Score
HIGH
2025-01-11
2026-10-15 22:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 s390/cpum_sf 아키텍처에서 CPU 핫플러그 제거 시 샘플링 데이터 버퍼(SDB)가 이미 해제되었음에도 불구하고 이를 참조하려 시도하는 Use-After-Free 취약점이 존재합니다. CPU가 제거되는 과정에서 이벤트 제거 함수가 이미 해제된 메모리 영역에 접근하여 시스템 불안정이나 잘못된 데이터 읽기를 유발할 수 있습니다.

💡 쉬운 설명

컴퓨터의 CPU를 사용 중에 갑자기 제거할 때, 이미 삭제된 메모리 공간을 다시 읽으려고 시도하여 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 잘못된 정보가 처리될 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: s390/cpum_sf: Handle CPU hotplug remove during sampling CPU hotplug remove handling triggers the following function call sequence: CPUHP_AP_PERF_S390_SF_ONLINE --> s390_pmu_sf_offline_cpu() ... CPUHP_AP_PERF_ONLINE --> perf_event_exit_cpu() The s390 CPUMF sampling CPU hotplug handler invokes: s390_pmu_sf_offline_cpu() +--> cpusf_pmu_setup() +--> setup_pmc_cpu() +--> deallocate_buffers() This function de-allocates all sampling data buffers (SDBs) allocated for that CPU at event initialization. It also clears the PMU_F_RESERVED bit. The CPU is gone and can not be sampled. With the event still being active on the removed CPU, the CPU event hotplug support in kernel performance subsystem triggers the following function calls on the removed CPU: perf_event_exit_cpu() +--> perf_event_exit_cpu_context() +--> __perf_event_exit_context() +--> __perf_remove_from_context() +--> event_sched_out() +--> cpumsf_pmu_del() +--> cpumsf_pmu_stop() +--> hw_perf_event_update() to stop and remove the event. During removal of the event, the sampling device driver tries to read out the remaining samples from the sample data buffers (SDBs). But they have already been freed (and may have been re-assigned). This may lead to a use after free situation in which case the samples are most likely invalid. In the best case the memory has not been reassigned and still contains valid data. Remedy this situation and check if the CPU is still in reserved state (bit PMU_F_RESERVED set). In this case the SDBs have not been released an contain valid data. This is always the case when the event is removed (and no CPU hotplug off occured). If the PMU_F_RESERVED bit is not set, the SDB buffers are gone.

📍 영향받는 시스템

Linux Kernel (s390/cpum_sf 아키텍처를 사용하는 시스템)

⚔️ 공격 벡터

로컬 공격자가 CPU 핫플러그(Hotplug) 이벤트를 유도하여 메모리 오류를 발생시킴

🛡️ 대응 방법

커널 패치를 적용하여 CPU 제거 시 PMU_F_RESERVED 비트를 확인하고 이미 해제된 SDB 버퍼에 접근하지 않도록 수정해야 함

🔧 검증 코드

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

Shell / Script
uname -a

📊 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