🇰🇷 한글 설명
Linux 커널의 media: chips-media: wave5 드라이버에서 인코더 처리 중 버퍼 관리 오류가 발생합니다. IRQ 응답이 버퍼를 사용자 공간으로 반환할 때, 준비 큐에서 인덱스가 제거되기 전 동일한 버퍼가 다시 큐에 추가되어 리스트가 자기 참조 루프에 빠질 수 있습니다. 이로 인해 리스트 헤드 연결이 끊어지고 포인터가 손상되는 문제가 발생합니다.
💡 쉬운 설명
동영상 인코딩 과정에서 메모리 버퍼를 관리하는 순서가 잘못되어 시스템이 혼란을 겪는 문제입니다. 이로 인해 데이터 처리 경로가 꼬이게 되어 시스템이 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: chips-media: wave5: Move src_buf Removal to finish_encode
During encoder processing, there is a case where the IRQ response could
return the buffer back to userspace via v4l2_m2m_buf_done call. In this
time, userspace could queue up this same buffer before start_encode removes
the index from the ready queue. This would then lead to a case where the
buffer in the ready queue could be a self loop due to the
WRITE_ONCE(prev->next, new) call in __list_add.
When __list_del is finally called, the loop is already made so nothing
points back to ready queue list head and pointers are poisoned.
A buffer should not be marked as DONE before the buffer is removed from
m2m ready queue. Move removal entirely to finish_encode.
📍 영향받는 시스템
Linux kernel (media: chips-media: wave5 driver components)
⚔️ 공격 벡터
특수하게 조작된 V4L2 M2M 요청을 통해 버퍼 재사용 타이밍을 악용하는 로컬 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 버퍼 제거 로직을 finish_encode로 이동시켜야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.