🇰🇷 한글 설명
Linux kernel cpufreq intel_pstate 드라이버의 update_cpu_qos_request() 함수에서 policy 검증 전 NULL 포인터를 역참조하는 취약점입니다. 'nosmt' 파라미터로 부팅된 시스템에서 SMT 형제 스레드의 cpudata가 NULL일 때 발생하며, pstate.turbo_freq 접근으로 인해 NULL 포인터 역참조 오류가 발생합니다.
💡 쉬운 설명
Linux 커널의 CPU 전력 관리 기능에서 존재하지 않는 데이터에 접근하려는 오류가 발생합니다. 특정 부팅 옵션을 사용한 시스템에서 CPU 성능 요청 시 시스템 충돌을 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
cpufreq: intel_pstate: Fix NULL pointer dereference in update_cpu_qos_request()
The update_cpu_qos_request() function attempts to initialize the 'freq'
variable by dereferencing 'cpudata' before verifying if the 'policy'
is valid.
This issue occurs on systems booted with the "nosmt" parameter, where
all_cpu_data[cpu] is NULL for the SMT sibling threads. As a result,
any call to update_qos_requests() will result in a NULL pointer
dereference as the code will attempt to access pstate.turbo_freq using
the NULL cpudata pointer.
Also, pstate.turbo_freq may be updated by intel_pstate_get_hwp_cap()
after initializing the 'freq' variable, so it is better to defer the
'freq' until intel_pstate_get_hwp_cap() has been called.
Fix this by deferring the 'freq' assignment until after the policy and
driver_data have been validated.
[ rjw: Added one paragraph to the changelog ]
📍 영향받는 시스템
Intel 프로세서 기반의 Linux 시스템 ('nosmt' 부트 파라미터 사용, intel_pstate 드라이버)
⚔️ 공격 벡터
로컬 공격: 시스템 사용자가 CPU 성능/전력 관련 인터페이스를 통해 취약한 함수를 호출하여 DoS 유발
🛡️ 대응 방법
Linux kernel 업데이트 (Intel pstate 드라이버의 NULL 포인터 검증 로직 추가)
🔧 검증 코드
커널 버전 확인 후, nosmt 파라미터 적용 여부와 intel_pstate 드라이버 활성화 상태를 확인. 세 조건이 모두 충족되면 취약 상태. 아무 것도 출력 안 되면 영향 없음.
uname -r && grep -q 'nosmt' /proc/cmdline && dmesg | grep -i 'intel_pstate' || echo 'Not vulnerable setup'