{"id":"DEBIAN-CVE-2025-59729","details":"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.","modified":"2025-11-04T14:23:45.754865Z","published":"2025-10-06T08:15:34Z","withdrawn":"2025-11-04T14:23:45.754865Z","upstream":["CVE-2025-59729"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2025-59729"}],"affected":[{"package":{"name":"ffmpeg","ecosystem":"Debian:11","purl":"pkg:deb/debian/ffmpeg?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["7:4.3.2-0+deb11u2","7:4.3.2-1","7:4.3.2-2","7:4.3.3-0+deb11u1","7:4.3.4-0+deb11u1","7:4.3.5-0+deb11u1","7:4.3.6-0+deb11u1","7:4.3.7-0+deb11u1","7:4.3.8-0+deb11u1","7:4.3.8-0+deb11u2","7:4.3.8-0+deb11u3","7:4.3.9-0+deb11u1","7:4.4-1","7:4.4-2","7:4.4-3","7:4.4-4","7:4.4-5","7:4.4-6","7:4.4.1-1","7:4.4.1-2","7:4.4.1-2+ports","7:4.4.1-3","7:4.4.2-1","7:5.0-1","7:5.0-2","7:5.0-3","7:5.0.1-1","7:5.0.1-2","7:5.0.1-3","7:5.1-1","7:5.1-2","7:5.1-2.1","7:5.1-3","7:5.1.1-1","7:5.1.1-2","7:5.1.1-2+m68k","7:5.1.2-1","7:5.1.2-2","7:5.1.2-3","7:5.1.3-1","7:5.1.3-2","7:6.0-1","7:6.0-2","7:6.0-3","7:6.0-4","7:6.0-5","7:6.0-6","7:6.0-7","7:6.0-8","7:6.0-9","7:6.1-1","7:6.1-2","7:6.1-3","7:6.1-4","7:6.1-5","7:6.1.1-1","7:6.1.1-2","7:6.1.1-3","7:6.1.1-4","7:6.1.1-5","7:7.0-1","7:7.0.1-1","7:7.0.1-2","7:7.0.1-3","7:7.0.1-4","7:7.0.1-5","7:7.0.2-1","7:7.0.2-2","7:7.0.2-3","7:7.1-1","7:7.1-2","7:7.1-3","7:7.1-4","7:7.1.1-1","7:7.1.2-1","7:8.0-1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-59729.json"}},{"package":{"name":"ffmpeg","ecosystem":"Debian:12","purl":"pkg:deb/debian/ffmpeg?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["7:5.1.3-1","7:5.1.3-2","7:5.1.4-0+deb12u1","7:5.1.5-0+deb12u1","7:5.1.6-0+deb12u1","7:5.1.7-0+deb12u1","7:6.0-1","7:6.0-2","7:6.0-3","7:6.0-4","7:6.0-5","7:6.0-6","7:6.0-7","7:6.0-8","7:6.0-9","7:6.1-1","7:6.1-2","7:6.1-3","7:6.1-4","7:6.1-5","7:6.1.1-1","7:6.1.1-2","7:6.1.1-3","7:6.1.1-4","7:6.1.1-5","7:7.0-1","7:7.0.1-1","7:7.0.1-2","7:7.0.1-3","7:7.0.1-4","7:7.0.1-5","7:7.0.2-1","7:7.0.2-2","7:7.0.2-3","7:7.1-1","7:7.1-2","7:7.1-3","7:7.1-4","7:7.1.1-1","7:7.1.2-1","7:8.0-1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-59729.json"}},{"package":{"name":"ffmpeg","ecosystem":"Debian:13","purl":"pkg:deb/debian/ffmpeg?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["7:7.1.1-1","7:7.1.2-0+deb13u1","7:7.1.2-1","7:8.0-1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-59729.json"}},{"package":{"name":"ffmpeg","ecosystem":"Debian:14","purl":"pkg:deb/debian/ffmpeg?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["7:7.1.1-1","7:7.1.2-1","7:8.0-1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-59729.json"}}],"schema_version":"1.7.3"}