🇰🇷 한글 설명
Linux 커널의 mmc via-sdmmc 드라이버에서 장치 제거 시 카드 감지 작업(card-detect work)이 적절히 취소되지 않는 취약점이 발견되었습니다. 이로 인해 장치가 제거된 후에도 이미 큐에 쌓인 작업이 실행되면서 해제된 메모리 영역에 접근하여 시스템 오류나 보안 문제를 일으킬 수 있습니다.
💡 쉬운 설명
컴퓨터에서 SD 카드 같은 장치를 뽑을 때, 장치가 이미 사라졌는데도 컴퓨터가 계속 그 장치를 조작하려고 시도하여 시스템이 멈추거나 오류가 발생하는 문제입니다. 장치를 제거하는 과정에서 메모리 관리 순서가 잘못되어 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mmc: via-sdmmc: cancel card-detect work on remove
Disabling the device interrupt and freeing the IRQ prevents new card-detect
work from being queued, but carddet_work already queued by the handler can
still run after via_sd_remove() returns. via_sdc_card_detect() recovers the
host through container_of() and dereferences its MMIO base; once remove()
returns the host can be freed, so that work would touch freed memory.
Cancel carddet_work after freeing the IRQ and before cancelling
finish_bh_work, which the card-detect handler can also queue. carddet_work
can re-enable the interrupt through via_reset_pcictrl(); mask it again
afterwards.
This issue was found by an in-house static analysis tool and confirmed by
manual code review.
📍 영향받는 시스템
Linux kernel (mmc via-sdmmc driver 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 장치 제거 시점을 조작하거나 특정 하드웨어 인터럽트를 유도하여 Use-After-Free(UAF) 상황을 유발할 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 carddet_work 취소 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인