🇰🇷 한글 설명
Linux 커널의 rtl2832 드라이버에서 rtl2832_remove() 함수 호출 시 발생하는 Use-After-Free 취약점입니다. i2c_mux_del_adapters()가 호출되기 전에 작업 취소가 이루어져, 동시 실행 중인 I2C 전송이 타이머를 재스케줄링함으로써 메모리 해제 후 접근이 발생할 수 있습니다.
💡 쉬운 설명
장치를 제거하는 과정에서 작업이 완전히 끝나기 전에 메모리를 먼저 비워버려 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: rtl2832: fix use-after-free in rtl2832_remove()
cancel_delayed_work_sync() is called before i2c_mux_del_adapters()
in rtl2832_remove(). While the cancel waits for any running instance
of i2c_gate_work to finish, it does not prevent the timer from being
rescheduled by a concurrent thread.
During probe, the r820t_attach() call attempts I2C transfers through
the mux adapter. These transfers go through i2c_mux_master_xfer(),
which calls rtl2832_deselect() after the transfer completes,
rescheduling i2c_gate_work via schedule_delayed_work(). If this
transfer is still in flight when rtl2832_remove() runs,
rtl2832_deselect() can reschedule i2c_gate_work after it has been
cancelled, causing a use-after-free when kfree(dev) is called.
Fix this by calling i2c_mux_del_adapters() before
cancel_delayed_work_sync(). Once the mux adapter is unregistered, no
new I2C transfers can go through it, so rtl2832_deselect() can no
longer reschedule i2c_gate_work. The subsequent
cancel_delayed_work_sync() is then guaranteed to be final.
📍 영향받는 시스템
Linux kernel (media: rtl2832 driver 포함 버전)
⚔️ 공격 벡터
장치 제거(remove) 프로세스 중 특정 타이밍에 I2C 전송을 유도하여 메모리 오류 유발
🛡️ 대응 방법
커널 패치를 통해 i2c_mux_del_adapters()를 cancel_delayed_work_sync()보다 먼저 호출하도록 수정
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux