🇰🇷 한글 설명
Linux 커널의 MIPI I3C HCI 인터럽트 핸들러에서 i3c_hci_addr_to_dev() 함수 호출 시 발생하는 레이스 컨디션 취약점입니다. 장치 추가/제거 과정에서 리스트가 동시에 수정될 경우 Use-After-Free 또는 시스템 크래시가 발생할 수 있습니다.
💡 쉬운 설명
장치를 연결하거나 제거하는 도중에 시스템이 해당 장치를 찾으려고 시도하면 충돌이 발생할 수 있는 문제입니다. 이로 인해 컴퓨터 시스템이 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
i3c: mipi-i3c-hci: Fix race in i3c_hci_addr_to_dev()
i3c_hci_addr_to_dev() walks bus->devs.i3c, which is protected by
bus.lock (rwsem). However, it is invoked from the MIPI I3C HCI IRQ
handler, which cannot take bus.lock. This allows concurrent device
addition/removal in the I3C core to modify the list while it is being
traversed, potentially leading to use-after-free or crashes.
Remove the dependency on the bus device list and introduce a dedicated
lookup table. Add an ibi_devs[] array indexed by DAT entry, maintained
under hci->lock. Update the array when IBIs are enabled or disabled,
so that it always reflects the set of devices allowed to generate IBIs.
Also update when IBIs are freed, to cover the corner case when an IBI is
freed without first being disabled (e.g. oldedev in
i3c_master_add_i3c_dev_locked()).
Move i3c_hci_addr_to_dev() into core.c, reimplement it using the new
array, and add a lockdep assertion to enforce that hci->lock is held
by callers.
Demote a message in PIO and DMA IBI handling, from an error to a debug
message, because there is a race window when the condition can arise
normally.
📍 영향받는 시스템
Linux Kernel (MIPI I3C HCI 드라이버 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 I3C 장치의 빈번한 추가/제거를 유도하여 메모리 오류 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인