Heap-based buffer overflow in FFmpeg - CVE-2019-13312

 

Heap-based buffer overflow in FFmpeg - CVE-2019-13312

Published: July 18, 2019 / Updated: July 12, 2020


Vulnerability identifier: #VU19233
CSH Severity: Medium
CVSS v4: 7.5 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2019-13312
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error when processing media files in block_cmp() function in libavcodec/zmbvenc.c. A remote attacker can create a specially crafted media file, trick the victim into opening it, trigger heap-based buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

FFmpeg
Gentoo Linux
Ubuntu
ffmpeg (Alpine package)
libswscale-ffmpeg3 (Ubuntu package)
libavcodec-ffmpeg-extra56 (Ubuntu package)
libavcodec-ffmpeg56 (Ubuntu package)
libavdevice-ffmpeg56 (Ubuntu package)
libavfilter-ffmpeg5 (Ubuntu package)
libavformat-ffmpeg56 (Ubuntu package)
libavresample-ffmpeg2 (Ubuntu package)
libavutil-ffmpeg54 (Ubuntu package)
ffmpeg (Ubuntu package)
libpostproc-ffmpeg53 (Ubuntu package)
libswresample-ffmpeg1 (Ubuntu package)
libavdevice57 (Ubuntu package)
libswscale4 (Ubuntu package)
libswresample2 (Ubuntu package)
libpostproc54 (Ubuntu package)
libavutil55 (Ubuntu package)
libavresample3 (Ubuntu package)
libavformat57 (Ubuntu package)
libavfilter6 (Ubuntu package)
libavfilter-extra6 (Ubuntu package)
libavcodec57 (Ubuntu package)
libavcodec-extra57 (Ubuntu package)
libpostproc55 (Ubuntu package)
libavutil56 (Ubuntu package)
libavresample4 (Ubuntu package)
libavformat58 (Ubuntu package)
libavfilter7 (Ubuntu package)
libavfilter-extra7 (Ubuntu package)
libavdevice58 (Ubuntu package)
libavcodec58 (Ubuntu package)
libavcodec-extra58 (Ubuntu package)
libswresample3 (Ubuntu package)
libswscale5 (Ubuntu package)

How to mitigate CVE-2019-13312

Install update from vendor's website.

FFmpeg - update to 4.2.3
ffmpeg (Alpine package) - update to 4.2.4-r0
libswscale-ffmpeg3 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
libavcodec-ffmpeg-extra56 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
libavcodec-ffmpeg56 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
libavdevice-ffmpeg56 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
libavfilter-ffmpeg5 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
libavformat-ffmpeg56 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
libavresample-ffmpeg2 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
libavutil-ffmpeg54 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
ffmpeg (Ubuntu package) - addressed in versions 7:2.8.17-0ubuntu0.1, 7:3.4.8-0ubuntu0.2, 7:4.2.4-1ubuntu0.1
libpostproc-ffmpeg53 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
libswresample-ffmpeg1 (Ubuntu package) - update to 7:2.8.17-0ubuntu0.1
libavdevice57 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libswscale4 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libswresample2 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libpostproc54 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libavutil55 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libavresample3 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libavformat57 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libavfilter6 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libavfilter-extra6 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libavcodec57 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libavcodec-extra57 (Ubuntu package) - update to 7:3.4.8-0ubuntu0.2
libpostproc55 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libavutil56 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libavresample4 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libavformat58 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libavfilter7 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libavfilter-extra7 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libavdevice58 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libavcodec58 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libavcodec-extra58 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libswresample3 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1
libswscale5 (Ubuntu package) - update to 7:4.2.4-1ubuntu0.1

External References

Related Security Bulletins