Commit 144cf28e7e for ffmpeg
commit 144cf28e7e275a253eac0cf6f08dce6356ca87d9
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Tue Nov 17 00:35:07 2026 +0100
avformat/iamf_reader: reject parameter blocks with more subblocks than bytes
Subblocks beyond the end of the OBU were read as zeros, the resulting
parameters are attached to every audio packet.
Out of memory Replicated through API
Fixes: OOM
Fixes: 579141633/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6145767199539200
Fixes: It1CcPzF1iT8
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
diff --git a/libavformat/iamf_reader.c b/libavformat/iamf_reader.c
index c2375ea835..4f409a706d 100644
--- a/libavformat/iamf_reader.c
+++ b/libavformat/iamf_reader.c
@@ -176,7 +176,7 @@ static int parameter_block_obu(AVFormatContext *s, IAMFDemuxContext *c,
nb_subblocks = param->nb_subblocks;
}
- if (nb_subblocks > duration) {
+ if (nb_subblocks > duration || nb_subblocks > len) {
av_log(s, AV_LOG_ERROR, "Invalid duration or subblock count in parameter_id %u\n", parameter_id);
ret = AVERROR_INVALIDDATA;
goto fail;