🇰🇷 한글 설명
Linux 커널의 iio:chemical:atlas-sensor 드라이버에서 Use-After-Free(UAF) 취약점이 발견되었습니다. 드라이버 제거 시 대기 중인 irq_work가 적절히 처리되지 않아, 이미 해제된 메모리 영역에 접근하여 시스템 불안정이나 권한 상승을 유발할 수 있습니다.
💡 쉬운 설명
장치를 제거할 때 컴퓨터가 아직 사용 중인 데이터를 갑자기 지워버려서 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 해커가 시스템 제어권을 얻을 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
iio: chemical: atlas-sensor: use iio_trigger_poll_nested() to fix remove UAF
The atlas driver requests its hardware data-ready IRQ with
devm_request_threaded_irq(); its threaded handler queues an irq_work,
atlas_work_handler(), that calls iio_trigger_poll(data->trig).
The IRQ is devm-managed, so free_irq() runs from the devres unwind after
atlas_remove() returns without flushing that irq_work. Once a buffer is
enabled, conversion-complete IRQs keep firing and queueing it; a pending
irq_work can therefore run after the unwind has freed atlas_data/indio_dev
and the trigger, when atlas_work_handler() derives the atlas_data pointer
via container_of() and dereferences data->trig, a use-after-free.
Call iio_trigger_poll_nested() directly from the threaded handler instead
of bouncing through irq_work. free_irq() then drains the threaded handler,
closing the window; other iio drivers with a threaded data-ready IRQ do the
same (e.g. bmi270).
This issue was found by an in-house static analysis tool.
📍 영향받는 시스템
Linux kernel (iio:chemical:atlas-sensor driver 포함 버전)
⚔️ 공격 벡터
특정 하드웨어 센서(atlas-sensor)를 사용하는 환경에서 장치 제거 프로세스를 유도하여 메모리 오류 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 iio_trigger_poll_nested()를 사용하도록 수정
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인