🇰🇷 한글 설명
Linux 커널의 irqchip/imgpdc 드라이버에서 리소스 누수 및 체인 핸들러 정리 미흡 문제가 발견되었습니다. 드라이버 제거 시 할당된 generic chip이 해제되지 않고 체인 핸들러가 남아 있어, 이후 시스템 동작 시 Use-After-Free 및 커널 크래시를 유발할 수 있습니다.
💡 쉬운 설명
장치를 제거할 때 사용하던 메모리와 연결 고리를 제대로 정리하지 않아 발생하는 문제입니다. 이로 인해 시스템이 나중에 엉뚱한 메모리에 접근하려고 시도하다가 컴퓨터가 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
irqchip/imgpdc: Fix resource leak, add missing chained handler cleanup on remove
The driver allocates domain generic chips using
irq_alloc_domain_generic_chips() during probe and sets up chained
handlers using irq_set_chained_handler_and_data(). However, on driver
removal, the generic chips are not freed and the chained handlers are
not removed.
The generic chips remain on the global gc_list and may later be accessed by
generic interrupt chip suspend, resume, or shutdown callbacks after the
driver has been removed, potentially resulting in a use-after-free and
kernel crash.
The chained handlers that were installed in probe for peripheral and
syswake interrupts are also left dangling, which can lead to spurious
interrupts accessing freed memory.
Fix these issues by:
- Setting IRQ_DOMAIN_FLAG_DESTROY_GC flag in domain->flags, so the
core code automatically removes generic chips when irq_domain_remove()
is called
- Clearing all chained handlers with NULL in pdc_intc_remove()
📍 영향받는 시스템
Linux kernel (irqchip/imgpdc 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 공격자가 드라이버를 반복적으로 로드 및 제거하여 커널 메모리 오류를 유발하고 시스템을 중단시킬 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 IRQ_DOMAIN_FLAG_DESTROY_GC 플래그 및 핸들러 정리 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.