Hi, This patch fixes a potential division by zero in the VPK demuxer. The current code lacked validation for sample_rate and nb_channels before using them in the samples_per_block calculation.
I have verified the fix against a 21-byte PoC file that triggers the vulnerability. Reproduction: Build FFmpeg from the latest master (as of late March 2026). Run the following command: ffmpeg -i [attached_crash_file] -f null - Observed Result: The process terminates with a floating-point exception: 8 (or UndefinedBehaviorSanitizer: division by zero). Expected Result: The demuxer should validate the header and return AVERROR_INVALIDDATA instead of crashing. Signed-off-by: Samyak Annapureddy <[email protected]> ---
vpk_crash_poc (2) (1)
Description: Binary data
0001-avformat-vpk-fix-FPE-in-vpk_read_header (1).patch
Description: Binary data
_______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
