🇰🇷 한글 설명
리눅스 커널의 cpufreq 모듈에서 재부팅 시 발생하는 레이스 컨디션 취약점입니다. 재부팅 과정 중 CPU 핫플러그 작업과 cpufreq_suspend() 함수가 동시에 실행되면서 governor_data가 해제되어 NULL 포인터 역참조가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터를 다시 시작할 때 CPU 설정이 바뀌는 과정에서 충돌이 일어나 시스템이 멈추거나 오류가 발생할 수 있는 문제입니다. CPU가 꺼지거나 켜지는 동작과 전력 관리 동작이 서로 엉키면서 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
cpufreq: Fix hotplug-suspend race during reboot
During system reboot, cpufreq_suspend() is called via the
kernel_restart() -> device_shutdown() path. Unlike the normal system
suspend path, the reboot path does not call freeze_processes(), so
userspace processes and kernel threads remain active.
This allows CPU hotplug operations to run concurrently with
cpufreq_suspend(). The original code has no synchronization with CPU
hotplug, leading to a race condition where governor_data can be freed
by the hotplug path while cpufreq_suspend() is still accessing it,
resulting in a null pointer dereference:
Unable to handle kernel NULL pointer dereference
Call Trace:
do_kernel_fault+0x28/0x3c
cpufreq_suspend+0xdc/0x160
device_shutdown+0x18/0x200
kernel_restart+0x40/0x80
arm64_sys_reboot+0x1b0/0x200
Fix this by adding cpus_read_lock()/cpus_read_unlock() to
cpufreq_suspend() to block CPU hotplug operations while suspend is in
progress.
[ rjw: Changelog edits ]
📍 영향받는 시스템
CPU 주파수 관리(cpufreq) 기능을 사용하는 리눅스 커널 버전
⚔️ 공격 벡터
로컬 시스템 재부팅 시 CPU 핫플러그 이벤트를 유도하여 커널 패닉 유발
🛡️ 대응 방법
cpufreq_suspend() 함수에 cpus_read_lock() 및 cpus_read_unlock()을 추가하여 CPU 핫플러그 작업을 차단하는 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인