🇰🇷 한글 설명
Linux 커널의 bq24257 전원 공급 장치 드라이버에서 remove() 함수 호출 시 use-after-free 취약점이 발생합니다. STAT-pin 인터럽트 핸들러가 장치 제거 후에도 실행되어 이미 해제된 메모리 영역을 참조할 수 있는 문제입니다.
💡 쉬운 설명
컴퓨터 부품을 제거하는 과정에서 프로그램이 이미 사라진 메모리 주소를 다시 사용하려고 시도하여 오류가 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 예기치 않은 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
power: supply: bq24257: fix use-after-free on remove
The STAT-pin interrupt is devm-managed, so it stays armed until the devm
cleanup that runs after remove() returns. remove() cancels
bq->iilimit_setup_work while the threaded handler can still fire; that
handler reschedules the work and dereferences bq, so the work runs
against freed memory once devm frees bq.
Make the delayed work device-managed with devm_delayed_work_autocancel(),
registered before the interrupt request. The devm cleanup then releases
the interrupt first, so the handler can no longer reschedule the work,
and cancels the work before bq is freed. The explicit
cancel_delayed_work_sync() in remove() is no longer needed and is dropped.
Found by static analysis.
📍 영향받는 시스템
Linux kernel (bq24257 driver 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 특정 하드웨어 인터럽트를 유도하여 메모리 오류를 일으킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인