🇰🇷 한글 설명
Linux 커널의 perf 서브시스템에서 RaptorLake CPU의 E-코어가 지원하지 않는 topdown 성능 메트릭 기능을 호출할 때 발생하는 하드 락 크래시입니다. 함수 검사 로직을 잘못 변경한 회귀 버그로 인해 지원하지 않는 기능을 호출하려 시도합니다. 시스템 패닉을 유발할 수 있습니다.
💡 쉬운 설명
Linux의 성능 모니터링 기능에서 일부 Intel 프로세서의 코어가 지원하지 않는 기능을 호출하려다가 시스템이 갑자기 멈추는 문제입니다. 최근 코드 변경에서 함수 확인 방식을 잘못 수정한 것이 원인입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
perf/x86/intel: Fix crash in icl_update_topdown_event()
The perf_fuzzer found a hard-lockup crash on a RaptorLake machine:
Oops: general protection fault, maybe for address 0xffff89aeceab400: 0000
CPU: 23 UID: 0 PID: 0 Comm: swapper/23
Tainted: [W]=WARN
Hardware name: Dell Inc. Precision 9660/0VJ762
RIP: 0010:native_read_pmc+0x7/0x40
Code: cc e8 8d a9 01 00 48 89 03 5b cd cc cc cc cc 0f 1f ...
RSP: 000:fffb03100273de8 EFLAGS: 00010046
....
Call Trace:
<TASK>
icl_update_topdown_event+0x165/0x190
? ktime_get+0x38/0xd0
intel_pmu_read_event+0xf9/0x210
__perf_event_read+0xf9/0x210
CPUs 16-23 are E-core CPUs that don't support the perf metrics feature.
The icl_update_topdown_event() should not be invoked on these CPUs.
It's a regression of commit:
f9bdf1f95339 ("perf/x86/intel: Avoid disable PMU if !cpuc->enabled in sample read")
The bug introduced by that commit is that the is_topdown_event() function
is mistakenly used to replace the is_topdown_count() call to check if the
topdown functions for the perf metrics feature should be invoked.
Fix it.
📍 영향받는 시스템
Linux kernel (f9bdf1f95339 커밋 이후 버전), Intel RaptorLake 및 유사 아키텍처의 E-core 프로세서
⚔️ 공격 벡터
로컬 공격 가능, perf 성능 모니터링 기능 설정 또는 perf_fuzzer를 통해 트리거
🛡️ 대응 방법
Linux 커널 업데이트, icl_update_topdown_event() 함수의 is_topdown_event() 호출을 is_topdown_count()로 수정하는 패치 적용
🔧 검증 코드
커널 버전과 프로세서 모델을 확인하여 RaptorLake E-core 아키텍처이고 커널 버전이 패치된 버전(또는 그 이상)인지 확인하세요. 취약한 커널 버전이면 업데이트 필요합니다.
uname -r && lscpu | grep -E '(Model name|Stepping)'