🇰🇷 한글 설명
Linux 커널의 Rockchip GPIO 드라이버에서 디바이스 제거 시 클록 참조 누수, 인터럽트 핸들러 미해제, IRQ 도메인 누수 문제가 발견되었습니다. 이러한 자원 관리 오류는 시스템의 안정성을 저해하고 커널 패닉을 유발할 수 있습니다.
💡 쉬운 설명
기기가 꺼지거나 드라이버가 제거될 때 사용하던 메모리와 자원을 제대로 돌려주지 않는 버그입니다. 이로 인해 시스템이 멈추거나 오류가 발생하여 컴퓨터가 갑자기 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
gpio: rockchip: teardown bugs and resource leaks
Address several teardown issues and resource leaks in the driver's remove
path and error handling:
1. Debounce clock reference leak: The debounce clock (bank->db_clk) is
obtained using of_clk_get() which increments the clock's reference
count, but clk_put() is never called. Register a devm action to
cleanly release it on unbind. Note that of_clk_get(..., 1) remains
necessary over devm_clk_get() because the DT binding does not define
clock-names, precluding name-based lookup.
2. Unregistered chained IRQ handler: The chained IRQ handler is not
disconnected in remove(). If a stray interrupt fires after the driver
is removed, the kernel attempts to execute a stale handler, leading
to a panic. Fix this by clearing the handler in remove().
3. IRQ domain leak: The linear IRQ domain and its generic chips are
allocated manually during probe but never removed. Remove the IRQ
domain during driver teardown to free the associated generic chips
and mappings.
[Bartosz: don't emit an error message on devres allocation failure]
📍 영향받는 시스템
Rockchip GPIO 드라이버를 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
직접적인 외부 공격보다는 드라이버의 반복적인 로드/언로드 또는 오류 상황을 유도하여 시스템 자원을 고갈시키거나 커널 패닉을 유발하는 방식
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인