🇰🇷 한글 설명
Linux 커널의 twl4030_charger 드라이버에서 devm으로 할당된 bci 구조체가 해제된 후에도 작업자(worker)가 실행될 수 있는 레이스 컨디션 취약점이 발견되었습니다. 이로 인해 메모리 해제 후 참조(Use-After-Free)가 발생할 수 있으며, 이를 해결하기 위해 devm_work_autocancel을 사용하여 작업자 취소 순서를 보장하도록 수정되었습니다.
💡 쉬운 설명
컴퓨터 부품을 관리하는 프로그램이 부품을 제거하는 과정에서, 이미 사라진 부품을 다시 사용하려고 시도하여 오류가 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 예기치 않은 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
power: supply: twl4030_charger: cancel workers via devm
bci is devm-allocated. Two workers (bci->work and bci->current_worker)
dereference it. twl4030_bci_remove() disables charging and masks
interrupts. It cancels neither worker. A worker pending at remove() can
run after devm frees bci.
The USB transceiver comes from devm_usb_get_phy_by_node(). devm
unregisters its notifier only after remove() returns. A cancel_work_sync()
in remove() can then race a notifier reschedule. devm_work_autocancel()
and devm_delayed_work_autocancel() avoid that. They cancel the workers
during devm release, before bci is freed.
The current_worker is registered first, since devm will cancel in
reverse order and bci->work can reschedule current_worker.
[Move comment about order into the commit message]
📍 영향받는 시스템
Linux kernel (twl4030_charger 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 하드웨어 제어 시퀀스를 유도하여 메모리 해제 후 참조(Use-After-Free)를 유발할 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인하십시오.