🇰🇷 한글 설명
Linux 커널의 qcom-cpufreq-hw 드라이버에서 메모리 관리 오류로 인한 Double Free 취약점이 발견되었습니다. devm_kzalloc로 할당된 메모리를 kfree로 수동 해제하려 시도함으로써, 장치 분리 시 중복 해제가 발생할 수 있는 문제입니다.
💡 쉬운 설명
컴퓨터가 메모리를 정리할 때 이미 지운 것을 또 지우려고 시도하여 시스템 오류를 일으킬 수 있는 결함입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
cpufreq: qcom-cpufreq-hw: Fix possible double free
qcom_cpufreq.data is allocated with devm_kzalloc() in probe() as an
array of per-domain data. qcom_cpufreq_hw_cpu_init() stores a pointer to
one element of this array in policy->driver_data.
qcom_cpufreq_hw_cpu_exit() currently calls kfree() on policy->driver_data.
This is not valid because the memory is devm-managed. For the first
domain, this can free the devm-managed allocation while the devres entry
is still active, leading to a possible double free when the platform
device is later detached. For other domains, the pointer may refer to an
element inside the array rather than the allocation base.
Remove the kfree(data) call and let devres release qcom_cpufreq.data.
This issue was found by a static analysis tool I am developing.
📍 영향받는 시스템
Qualcomm 프로세서를 사용하는 Linux 커널 기반 시스템 (qcom-cpufreq-hw 드라이버 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 특정 하드웨어 드라이버 조작을 통해 메모리 오류를 유도하여 시스템 충돌 또는 권한 상승 시도 가능
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 kfree() 호출이 제거된 패치를 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.