🇰🇷 한글 설명
Linux 커널의 qcom_battmgr 드라이버에서 Use-After-Free 취약점이 발견되었습니다. PMIC GLINK 서비스가 종료될 때 devres 해제 작업이 완료되기 전, 대기 중이거나 실행 중인 워커가 이미 해제된 battmgr 메모리에 접근하여 문제가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품을 관리하는 프로그램이 이미 삭제된 메모리 공간을 다시 사용하려고 시도하여 시스템 오류를 일으킬 수 있는 문제입니다. 이로 인해 시스템이 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
power: supply: qcom_battmgr: fix use-after-free
qcom_battmgr_pdr_notify() queues enable_work when the PMIC GLINK service
comes up, and the worker recovers battmgr through container_of() to issue
firmware requests. The PMIC GLINK client stays on the client list until
its devres release action runs, so a PDR notification can keep queueing
the work, and a pending or running worker can access battmgr after devres
frees it.
Make enable_work device-managed with devm_work_autocancel(), registered
before the PMIC GLINK client is allocated. The devres cleanup then
releases the client first, so no further notification can queue the work,
and cancels the work before battmgr is freed.
This issue was found by an in-house static analysis tool.
📍 영향받는 시스템
Qualcomm PMIC를 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
특정 하드웨어 이벤트(PMIC GLINK 서비스 상태 변화)를 유도하여 메모리 오류 발생
🛡️ 대응 방법
devm_work_autocancel()을 사용하여 메모리 해제 전 워커 작업을 안전하게 취소하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인