🇰🇷 한글 설명
리눅스 커널의 hwmon coretemp 드라이버에서 플랫폼 디바이스 처리 방식을 단순화한 패치입니다. 기존 방식은 CPU 핫플러그 알림 내에서 플랫폼 디바이스를 동적으로 생성·삭제하여 drivers_autoprobe가 꺼진 경우 NULL 역참조가 발생할 수 있었고, 서스펜드 교착 및 lockdep 문제도 있었습니다. 이를 모듈 수명에 디바이스를 묶고 hwmon 인터페이스를 핫플러그 알림에서 직접 관리하도록 수정했습니다.
💡 쉬운 설명
CPU 온도 센서를 관리하는 리눅스 커널 드라이버의 내부 동작 방식을 정리한 수정입니다. 잘못된 조건에서 시스템이 비정상 동작하거나 멈출 수 있는 문제를 해결합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (coretemp) Simplify platform device handling
Coretemp's platform driver is unconventional. All the real work is done
globally by the initcall and CPU hotplug notifiers, while the "driver"
effectively just wraps an allocation and the registration of the hwmon
interface in a long-winded round-trip through the driver core. The whole
logic of dynamically creating and destroying platform devices to bring
the interfaces up and down is error prone, since it assumes
platform_device_add() will synchronously bind the driver and set drvdata
before it returns, thus results in a NULL dereference if drivers_autoprobe
is turned off for the platform bus. Furthermore, the unusual approach of
doing that from within a CPU hotplug notifier, already commented in the
code that it deadlocks suspend, also causes lockdep issues for other
drivers or subsystems which may want to legitimately register a CPU
hotplug notifier from a platform bus notifier.
All of these issues can be solved by ripping this unusual behaviour out
completely, simply tying the platform devices to the lifetime of the
module itself, and directly managing the hwmon interfaces from the
hotplug notifiers. There is a slight user-visible change in that
/sys/bus/platform/drivers/coretemp will no longer appear, and
/sys/devices/platform/coretemp.n will remain present if package n is
hotplugged off, but hwmon users should really only be looking for the
presence of the hwmon interfaces, whose behaviour remains unchanged.
📍 영향받는 시스템
패치 적용 이전의 리눅스 커널 (coretemp 드라이버를 사용하는 Intel CPU 시스템)
⚔️ 공격 벡터
로컬 사용자가 특정 설정(drivers_autoprobe 비활성화)이나 CPU 핫플러그 상황을 유도하여 커널 NULL 역참조 또는 서비스 거부를 일으킬 수 있음
🛡️ 대응 방법
배포판 커널 업데이트를 적용하거나 패치가 포함된 최신 리눅스 커널로 업그레이드
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지에서 해당 CVE 수정 버전과 비교하여, 현재 버전이 수정 버전 이상이면 패치된 것이고 미만이면 업데이트가 필요합니다.
uname -r && (dpkg -l 'linux-image*' 2>/dev/null | grep '^ii' | head -n 5 || rpm -q kernel 2>/dev/null)