🇰🇷 한글 설명
Linux 커널의 max77705 전원 공급 장치 드라이버에서 메모리 누수 및 잘못된 자원 해제 순서로 인한 취약점이 발견되었습니다. 작업 큐(workqueue)가 적절히 해제되지 않거나 인터럽트 핸들러가 해제되기 전에 작업 큐가 먼저 파괴되어 해제된 메모리에 접근할 수 있는 문제가 있습니다.
💡 쉬운 설명
컴퓨터 부품을 제어하는 소프트웨어에서 메모리를 제대로 치우지 않거나, 이미 없어진 메모리를 다시 사용하려고 시도하는 오류가 있습니다. 이로 인해 시스템이 불안정해지거나 예상치 못한 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
power: supply: max77705: Free allocated workqueue and fix removal order
Use devm interface for allocating workqueue to fix two bugs at the same
time:
1. Driver leaks the memory on remove(), because the workqueue is not
destroyed.
2. Driver allocates workqueue and then registers interrupt handlers
with devm interface. This means that probe error paths will not use a
reversed order, but first destroy the workqueue and then, via devm
release handlers, free the interrupt.
The interrupt handler schedules work on this exact workqueue, thus if
interrupt is hit in this short time window - after destroying
workqueue, but before devm() frees the interrupt - the schedulled
work will lead to use of freed memory.
Change is not equivalent in the workqueue itself: use non-legacy API
which does not set (__WQ_LEGACY | WQ_MEM_RECLAIM). The workqueue is
used to update power supply (power_supply_changed()) status, thus there
is no point to run it for memory reclaim. Note that dev_name() is not
directly used in second argument to prevent possible unlikely parsing
any "%" character in device name as format.
📍 영향받는 시스템
Linux kernel (max77705 driver 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 특정 하드웨어 인터럽트를 유도하여 해제된 메모리에 접근(Use-after-free)할 수 있음
🛡️ 대응 방법
max77705 드라이버의 devm 인터페이스를 사용하는 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인