🇰🇷 한글 설명
Linux 커널의 stm32-dcmipp 드라이버에서 start_streaming() 호출 실패 시 큐에 대기 중인 버퍼를 적절히 반환하지 않아 발생하는 메모리 누수 취약점입니다. 미디어 그래프에서 소스 서브디바이스를 찾지 못할 경우 에러가 발생하며, 이 과정에서 버퍼가 해제되지 않고 남아 있게 됩니다.
💡 쉬운 설명
카메라 관련 장치를 작동시키려다 오류가 발생했을 때, 사용하던 메모리 공간을 시스템에 돌려주지 않고 그대로 낭비하게 되는 문제입니다. 이 문제가 반복되면 시스템의 메모리가 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: stm32-dcmipp: Return queued buffers on start_streaming() failure
The vb2 framework hands buffers to the driver via buf_queue() before
calling start_streaming(). If start_streaming() returns an error
without first returning those buffers via vb2_buffer_done(),
vb2_start_streaming() fires WARN_ON(owned_by_drv_count) and the queued
buffers leak.
dcmipp_bytecap_start_streaming() returned -EINVAL when the source
subdevice could not be resolved from the media graph, before
pm_runtime_resume_and_get() and media_pipeline_start() had been called.
The remaining error paths already converge on the err_buffer_done
label, which calls dcmipp_bytecap_all_buffers_done(...,
VB2_BUF_STATE_QUEUED). Jump to that label directly: the intermediate
err_pm_put / err_media_pipeline_stop labels are skipped, which is
correct because nothing they would undo has happened yet.
This mirrors the uvcvideo fix in commit 4cf3b6fd54eb ("media: uvcvideo:
Return queued buffers on start_streaming() failure").
📍 영향받는 시스템
Linux kernel (stm32-dcmipp driver component)
⚔️ 공격 벡터
로컬 공격자가 미디어 그래프 설정을 조작하여 드라이버의 start_streaming() 함수가 에러를 반환하도록 유도하여 메모리 누수 유발
🛡️ 대응 방법
stm32-dcmipp 드라이버의 에러 처리 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 패치가 적용된 최신 버전인지 확인