🇰🇷 한글 설명
Linux 커널의 intel_powerclamp 써멀 드라이버에서, CPU 0이 오프라인 상태일 때 idle 주입을 수행하면 smp_processor_id()를 선점 가능 상태에서 호출하여 커널 BUG가 발생합니다. 수정은 get_cpu()를 사용해 선점을 비활성화하는 방식으로 이루어졌습니다.
💡 쉬운 설명
전원 관리 기능 중 하나에서 특정 CPU 상태에 따라 시스템이 경고와 함께 비정상 동작을 일으킬 수 있는 버그입니다. 이번 패치로 해당 충돌 가능성이 제거됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash
When CPU 0 is offline and intel_powerclamp is used to inject
idle, it generates kernel BUG:
BUG: using smp_processor_id() in preemptible [00000000] code: bash/15687
caller is debug_smp_processor_id+0x17/0x20
CPU: 4 PID: 15687 Comm: bash Not tainted 5.19.0-rc7+ #57
Call Trace:
<TASK>
dump_stack_lvl+0x49/0x63
dump_stack+0x10/0x16
check_preemption_disabled+0xdd/0xe0
debug_smp_processor_id+0x17/0x20
powerclamp_set_cur_state+0x7f/0xf9 [intel_powerclamp]
...
...
Here CPU 0 is the control CPU by default and changed to the current CPU,
if CPU 0 offlined. This check has to be performed under cpus_read_lock(),
hence the above warning.
Use get_cpu() instead of smp_processor_id() to avoid this BUG.
[ rjw: Subject edits ]
📍 영향받는 시스템
Linux 커널 5.19-rc7 등 intel_powerclamp 드라이버를 포함한 Intel 기반 Linux 시스템
⚔️ 공격 벡터
로컬 사용자가 intel_powerclamp 인터페이스를 통해 idle 주입을 트리거하면 커널 BUG가 발생해 서비스 거부가 유발될 수 있습니다.
🛡️ 대응 방법
배포판 벤더가 제공하는 커널 보안 업데이트를 적용하거나, 수정이 포함된 Linux 커널 버전으로 업그레이드하세요.
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지나 커널 changelog와 대조해 CVE-2022-50494 수정이 포함되었는지 확인하고, 해당 버전이 수정 이전이면 업데이트가 필요합니다.