🇰🇷 한글 설명
Linux 커널의 thermal: hwmon 모듈에서 thermal zone 장치가 제거될 때 관련 hwmon 클래스 장치가 제대로 제거되지 않는 취약점이 발견되었습니다. 특정 속성이 다른 thermal zone에 속해 있을 경우 장치 제거 프로세스가 중단되는 문제가 있었으며, 이를 해결하기 위해 장치 제거 시 전체 hwmon 인터페이스를 함께 제거하도록 수정되었습니다.
💡 쉬운 설명
컴퓨터의 온도를 관리하는 장치가 사라질 때, 관련 정보 파일들이 제대로 삭제되지 않아 시스템이 멈추거나 오류가 발생할 수 있는 문제입니다. 이번 업데이트를 통해 장치가 사라질 때 관련 정보들도 깨끗하게 함께 삭제되도록 개선되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
thermal: hwmon: Remove hwmon class device along with its parent
The current code creates one hwmon device per thermal zone type and that
device is registered under the first thermal zone of the given type.
That turns out to be problematic when the thermal zone holding the
hwmon device is removed.
For example, say that there are two ACPI thermal zones on a system
/sys/devices/virtual/thermal/thermal_zone0/
/sys/devices/virtual/thermal/thermal_zone1/
The current code registers a hwmon class device for thermal_zone0 only:
/sys/devices/virtual/thermal/thermal_zone0/hwmon0/
because the type is "acpitz" for both of them, but it adds a sysfs
attribute that belongs to thermal_zone1 under it:
/sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp2_input
There is also
/sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp1_input
which belongs to thermal_zone0.
When thermal_zone0 is removed, say because the ACPI thermal driver is
unbound from the underlying platform device, thermal_remove_hwmon_sysfs()
skips the removal of hwmon0 because of the temp2_input attribute
belonging to thermal_zone1 which effectively prevents thermal_zone0
removal from making progress.
Address this by making thermal_remove_hwmon_sysfs() remove the entire
hwmon class device interface for the given thermal zone type when the
thermal zone device holding it is removed.
To prevent races with thermal_add_hwmon_sysfs() that may interfere
with this, carry out the entire addition and removal of hwmon sysfs
interfaces for thermal zones under thermal_hwmon_list_lock.
Also adjust the layout of the labels in thermal_add_hwmon_sysfs() to
the current kernel coding style to align with the new "unlock" label.
📍 영향받는 시스템
Linux Kernel (thermal: hwmon 관련 모듈을 사용하는 시스템)
⚔️ 공격 벡터
직접적인 원격 공격보다는 시스템 드라이버 언바인딩 시 발생하는 리소스 해제 실패 및 커널 프로세스 지연 문제
🛡️ 대응 방법
최신 보안 패치가 적용된 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.