CVE-2025-59729
Fixed in a distro release EPSS <1%CVSS 5.7
When parsing the header for a DHAV file, there's an integer underflow in offset calculation that leads to reading the duration from before the start of the allocated buffer. If we load a DHAV file that is larger than MAX_DURATION_BUFFER_SIZE bytes (0x100000) for example 0x101000 bytes, then at [0] we have size = 0x101000. At [1] we have end_buffer_size = 0x100000, and at [2] we have end_buffer_pos = 0x1000. The loop then scans backwards through the buffer looking for the dhav tag; when it is found, we'll calculate end_pos based on a 32-bit offset read from the buffer. There is subsequently a check [3] that end_pos is within the section of the file that has been copied into end_buffer, but it only correctly handles the cases where end_pos is before the start of the file or after the section copied into end_buffer, and not the case where end_pos is within the the file, but before the section copied into end_buffer. If we provide such an offset, (end_pos - end_buffer_pos) can underflow, resulting in the subsequent access at [4] occurring before the beginning of the allocation. We recommend upgrading to version 8.0 or beyond.
Products: FFMPEG
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Chainguard | eco-python-ffmpeg-6-minimal | 6.1.6-r3 |
| Chainguard | eco-python-ffmpeg-6-minimal-dev | 6.1.6-r3 |
| Chainguard | eco-python-ffmpeg-6-minimal-static | 6.1.6-r3 |
| Chainguard | eco-python-ffmpeg-7-minimal | 7.1.5-r2 |
| Chainguard | eco-python-ffmpeg-7-minimal-dev | 7.1.5-r2 |
| Chainguard | eco-python-ffmpeg-7-minimal-static | 7.1.5-r2 |
| Chainguard | ffmpeg-6 | 6.1.6-r5 |
| Chainguard | ffmpeg-6-dev | 6.1.3-r0 |
| Chainguard | ffmpeg-6-doc | 6.1.3-r0 |
| Chainguard | ffmpeg-6-libavcodec61 | 6.1.3-r0 |
| Chainguard | ffmpeg-6-libavdevice61 | 6.1.3-r0 |
| Chainguard | ffmpeg-6-libavfilter10 | 6.1.3-r0 |
| Chainguard | ffmpeg-6-libavformat61 | 6.1.3-r0 |
| Chainguard | ffmpeg-6-libavutil59 | 6.1.3-r0 |
| Chainguard | ffmpeg-6-libpostproc58 | 6.1.3-r0 |
| Chainguard | ffmpeg-6-libswresample5 | 6.1.3-r0 |
| Chainguard | ffmpeg-6-libswscale8 | 6.1.3-r0 |
| Chainguard | ffmpeg-6-qt-faststart | 6.1.3-r0 |
| Chainguard | ffmpeg-6-static | 6.1.3-r0 |
| Chainguard | ffmpeg-7 | 7.1.5-r3 |
| Chainguard | ffmpeg-7-dev | 7.1.2-r0 |
| Chainguard | ffmpeg-7-doc | 7.1.2-r0 |
| Chainguard | ffmpeg-7-libavcodec61 | 7.1.2-r0 |
| Chainguard | ffmpeg-7-libavdevice61 | 7.1.2-r0 |
| Chainguard | ffmpeg-7-libavfilter10 | 7.1.2-r0 |
| Chainguard | ffmpeg-7-libavformat61 | 7.1.2-r0 |
| Chainguard | ffmpeg-7-libavutil59 | 7.1.2-r0 |
| Chainguard | ffmpeg-7-libpostproc58 | 7.1.2-r0 |
| Chainguard | ffmpeg-7-libswresample5 | 7.1.2-r0 |
| Chainguard | ffmpeg-7-libswscale8 | 7.1.2-r0 |
| Chainguard | ffmpeg-7-qt-faststart | 7.1.2-r0 |
| Chainguard | ffmpeg-7-static | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1 | 7.1.5-r4 |
| Chainguard | ffmpeg-7.1-dev | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-doc | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-libavcodec61 | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-libavdevice61 | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-libavfilter10 | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-libavformat61 | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-libavutil59 | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-libpostproc58 | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-libswresample5 | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-libswscale8 | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-qt-faststart | 7.1.2-r0 |
| Chainguard | ffmpeg-7.1-static | 7.1.2-r0 |
| Chainguard | torchaudio-ffmpeg-tarballs | 1-r2 |
| Chainguard | torchaudio-ffmpeg-tarballs-4.4.4 | 1-r2 |
| Chainguard | torchaudio-ffmpeg-tarballs-5.0.3 | 1-r2 |
| Chainguard | torchaudio-ffmpeg-tarballs-6.0 | 1-r2 |
| Debian 11 | ffmpeg | no fix |
| Debian 12 | ffmpeg | no fix |
| Debian 13 | ffmpeg | no fix |
| Debian 14 | ffmpeg | no fix |
| Ubuntu Pro 14.04 LTS | libav | no fix |
| Wolfi | ffmpeg-7 | 7.1.5-r3 |
| Wolfi | ffmpeg-7-dev | 7.1.2-r0 |
| Wolfi | ffmpeg-7-doc | 7.1.2-r0 |
| Wolfi | ffmpeg-7-libavcodec61 | 7.1.2-r0 |
| Wolfi | ffmpeg-7-libavdevice61 | 7.1.2-r0 |
| Wolfi | ffmpeg-7-libavfilter10 | 7.1.2-r0 |
| Wolfi | ffmpeg-7-libavformat61 | 7.1.2-r0 |
| Wolfi | ffmpeg-7-libavutil59 | 7.1.2-r0 |
| Wolfi | ffmpeg-7-libpostproc58 | 7.1.2-r0 |
| Wolfi | ffmpeg-7-libswresample5 | 7.1.2-r0 |
| Wolfi | ffmpeg-7-libswscale8 | 7.1.2-r0 |
| Wolfi | ffmpeg-7-qt-faststart | 7.1.2-r0 |
| Wolfi | ffmpeg-7-static | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1 | 7.1.5-r4 |
| Wolfi | ffmpeg-7.1-dev | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-doc | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-libavcodec61 | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-libavdevice61 | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-libavfilter10 | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-libavformat61 | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-libavutil59 | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-libpostproc58 | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-libswresample5 | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-libswscale8 | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-qt-faststart | 7.1.2-r0 |
| Wolfi | ffmpeg-7.1-static | 7.1.2-r0 |