🇰🇷 한글 설명
Linux 커널의 hwmon(pmbus/core) 모듈에서 전압 조절 작업 시 뮤텍스 보호가 누락되어 레이스 컨디션이 발생할 수 있는 취약점입니다. 이를 직접 수정할 경우 데드락(Deadlock)이 발생할 수 있어, 알림 기능을 워커 함수로 분리하여 뮤텍스 외부에서 처리하도록 구조를 개선하였습니다.
💡 쉬운 설명
하드웨어 전압을 조절하는 과정에서 여러 명령이 동시에 엉켜 시스템이 오작동하거나 멈출 수 있는 결함입니다. 이를 해결하기 위해 작업 순서를 안전하게 분리하여 충돌이 일어나지 않도록 수정되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (pmbus/core) Protect regulator operations with mutex
The regulator operations pmbus_regulator_get_voltage(),
pmbus_regulator_set_voltage(), and pmbus_regulator_list_voltage()
access PMBus registers and shared data but were not protected by
the update_lock mutex. This could lead to race conditions.
However, adding mutex protection directly to these functions causes
a deadlock because pmbus_regulator_notify() (which calls
regulator_notifier_call_chain()) is often called with the mutex
already held (e.g., from pmbus_fault_handler()). If a regulator
callback then calls one of the now-protected voltage functions,
it will attempt to acquire the same mutex.
Rework pmbus_regulator_notify() to utilize a worker function to
send notifications outside of the mutex protection. Events are
stored as atomics in a per-page bitmask and processed by the worker.
Initialize the worker and its associated data during regulator
registration, and ensure it is cancelled on device removal using
devm_add_action_or_reset().
While at it, remove the unnecessary include of linux/of.h.
📍 영향받는 시스템
Linux Kernel (pmbus/core hwmon driver 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 레이스 컨디션을 유발하여 커널 상태를 불안정하게 만들거나 시스템 중단을 유도할 수 있음
🛡️ 대응 방법
pmbus/core의 뮤텍스 보호 및 워커 함수 구조가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인