🇰🇷 한글 설명
Linux 커널의 lm90 하드웨어 모니터링 드라이버에서 장치 해제 시 작업 취소 순서가 잘못되어 발생하는 취약점입니다. 장치가 메모리에서 해제된 후에도 지연된 작업이 실행되어 해제된 메모리 주소에 접근하는 Use-After-Free 문제가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품의 온도를 체크하는 프로그램이 종료될 때, 이미 사라진 정보를 다시 읽으려고 시도하여 시스템 오류를 일으킬 수 있는 문제입니다. 이 과정에서 시스템이 멈추거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (lm90) Stop work before releasing hwmon device
Sashiko reports:
In lm90_probe(), the devm action to cancel the alert_work and report_work
(lm90_restore_conf) is registered in lm90_init_client() before
devm_hwmon_device_register_with_info() is called.
Because devm executes cleanup actions in reverse order during module
unbind or probe failure, the hwmon device is unregistered and freed first.
If lm90_alert_work() or lm90_report_alarms() runs in the window between
the hwmon device being freed and the delayed works being cancelled,
lm90_update_alarms() will dereference the freed data->hwmon_dev here.
Fix the problem by canceling the workers separately after registering
the hwmon device and before registering the interrupt handler. This ensures
that the workers are canceled after interrupts are disabled and before
the hwmon device is released. Add "shutdown" flag to indicate that device
shutdown is in progress to prevent workers from being re-armed.
📍 영향받는 시스템
Linux kernel (lm90 driver 사용 시스템)
⚔️ 공격 벡터
로컬 공격자가 장치 드라이버의 언바인드(unbind) 또는 프로브(probe) 실패 과정을 유도하여 메모리 오류를 발생시킴
🛡️ 대응 방법
커널 패치를 적용하여 장치 등록 후 작업 취소 순서를 올바르게 수정하고 shutdown 플래그를 도입해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인하십시오.