🇰🇷 한글 설명
Linux 커널의 rcar thermal 드라이버에서 probe() 함수 실행 중 오류 검사 로직에 결함이 발견되었습니다. thermal_zone_device_register_with_trips()의 실패 여부를 확인하기 전에 thermal_zone_device_enable()을 호출하여, 오류 포인터인 'priv->zone'을 참조함으로써 시스템 오류를 유발할 수 있는 취약점입니다.
💡 쉬운 설명
하드웨어 온도를 조절하는 드라이버가 초기화 과정에서 오류가 발생했음에도 불구하고 다음 단계를 강제로 진행하려다 시스템이 멈추거나 오류를 일으킬 수 있는 문제입니다. 장치가 제대로 준비되지 않았는데 작동을 시도하는 과정에서 발생하는 실수입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
thermal/drivers/rcar: Fix error checking in probe()
This code accidentally calls thermal_zone_device_enable() before checking
whether thermal_zone_device_register_with_trips() failed. Move the call
until later to avoid an error pointer dereference of "priv->zone".
The driver works differently depending on if we are using OF thermal or
not. We use thermal_add_hwmon_sysfs() if we are using OF thermal and
call thermal_zone_device_enable() if not. We can share same error check
for if either of these fail.
Moving the thermal_zone_device_enable() call is a bit cleaner as well.
The original code used a three step process to cleanup:
1. Call thermal_zone_device_unregister() to cleanup.
2. Set priv->zone to an error pointer to preserve the error code.
3. Set priv->zone to NULL to avoid a second call to
thermal_zone_device_unregister() in the rcar_thermal_remove()
function.
Now we can just do a direct goto error_unregister and rcar_thermal_remove()
handles the cleanup properly.
📍 영향받는 시스템
Linux kernel (thermal/drivers/rcar 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 하드웨어 구성이나 환경을 조작하여 드라이버 초기화 실패를 유도함으로써 시스템 오류를 발생시킬 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 thermal/drivers/rcar 드라이버의 오류 검사 로직을 수정해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인