🇰🇷 한글 설명
Linux 커널의 GPIO MXC 드라이버에서 체인형 IRQ 핸들러 설치와 프로브 완료 사이에 경쟁 조건이 존재합니다. 핸들러가 도메인이나 포트 목록이 준비되기 전에 활성화되거나, 프로브 실패 시 핸들러가 해제되지 않아 해제된 메모리를 참조하는 문제가 발생합니다.
💡 쉬운 설명
장치 초기화가 끝나기 전에 인터럽트 처리 기능이 먼저 켜져서, 아직 준비되지 않은 데이터를 건드릴 수 있습니다. 초기화가 실패하면 정리되지 않은 기능이 남아 메모리 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
gpio: mxc: fix race between chained IRQ handler install and probe completion
mxc_update_irq_chained_handler() is called before the IRQ domain, the
generic IRQ chip, and the port list entry are set up. If an interrupt
arrives in that window:
- mx3_gpio_irq_handler() calls generic_handle_domain_irq() with
port->domain still NULL.
- mx2_gpio_irq_handler() walks mxc_gpio_ports, but the port has not
been added to the list yet.
Additionally, if any of the subsequent probe steps
(gpio_generic_chip_init(), devm_gpiochip_add_data(),
irq_domain_create_legacy(), or mxc_gpio_init_gc()) fail, the error
paths never unregister the chained handler, leaving a dangling handler
that points at freed memory.
Move the handler installation after all its dependencies are ready and
after list_add_tail(), so the handler is never live while the data
structures it touches are incomplete, and is never installed if probe
fails.
📍 영향받는 시스템
Linux 커널 gpio-mxc 드라이버를 사용하는 NXP i.MX 기반 시스템 (수정 커밋 이전 버전)
⚔️ 공격 벡터
로컬 권한이 있는 공격자가 프로브 과정 중 인터럽트 타이밍을 조작하거나 장치 초기화 실패를 유도하여 커널 메모리 손상이나 서비스 거부를 일으킬 수 있습니다.
🛡️ 대응 방법
커널을 해당 수정이 포함된 최신 안정 버전으로 업데이트하거나 배포판의 보안 패치를 적용하세요.
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지 또는 커널 패치 목록과 대조해 gpio-mxc 수정이 포함되었는지 확인하며, 해당 드라이버가 없는 시스템이면 영향이 없습니다.