🇰🇷 한글 설명
FFmpeg 8.1.2 이하 버전에서 -safe 0 플래그로 처리되는 조작된 ffconcat 파일로 인해 경계 외 쓰기(out-of-bounds write) 취약점이 발생합니다. TY 디먹서의 demux_audio() 함수가 패킷 크기를 검증 없이 감소시켜 음수 값을 생성하고, 이것이 memcpy() 호출 시 매우 큰 size_t 값으로 변환되어 힙 메모리 오염을 유발합니다.
💡 쉬운 설명
특수하게 제작된 파일을 FFmpeg으로 재생할 때 프로그램의 메모리 영역을 넘어서는 데이터를 써넣는 오류가 발생합니다. 이로 인해 프로그램이 강제로 종료되거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
FFmpeg through 8.1.2 contains an out-of-bounds write vulnerability that allows attackers to cause heap corruption by supplying a crafted ffconcat file processed with the -safe 0 flag. The TY demuxer's demux_audio() function decrements packet size without bounds checking, producing a negative size value that is passed to memcpy() in shorten_decode_frame(), where conversion to size_t wraps the value to near SIZE_MAX and triggers reads beyond the source allocation and writes far beyond the Shorten decoder's bitstream buffer.
📍 영향받는 시스템
FFmpeg 8.1.2 및 그 이전 버전
⚔️ 공격 벡터
조작된 ffconcat 파일을 사용하여 -safe 0 옵션으로 FFmpeg 실행
🛡️ 대응 방법
FFmpeg을 최신 보안 패치가 적용된 버전으로 업데이트하거나 -safe 0 옵션 사용을 제한함
🔧 검증 코드
출력된 버전 번호가 8.1.2 이하인지 확인하여 취약 여부를 판단함
ffmpeg -version | head -n 1