From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 330434A6C9 for ; Wed, 3 Apr 2024 22:51:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 645AF68D13A; Thu, 4 Apr 2024 01:51:43 +0300 (EEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4232168CF08 for ; Thu, 4 Apr 2024 01:51:36 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9B2E2E0005 for ; Wed, 3 Apr 2024 22:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1712184695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=BS+CqGtzbYfDschlL5tpl5d0ZsrVyqttQmGFngcuU6s=; b=fgyb0EBWCqbzoQRSG0wUy9mjQOPe5t7aFWeEb82anZtBoOGW0N4k84Tlwepf7/12MTE4G1 Jasg6fh5wx03mTTV5zXGd0E3EfkQ4JyJN9VtrbcmevcvU0N7lkSPT1G2gEAzgi0IGyYTZ1 pbm3oN+CZf+x0AYWrmY43siZwUNwZ/JWf+WOpt8Eqrn7tMGahXz2IoCSM7AMqYhRCKAUzC 5z1WX1chSP+fNN6g3IjHZiE/oTe7HODTi3gjcsEmnZLAL8YFfdNiRghXArvSaBxzXPkdLe Vhyurwtjch3Bu9bE2i4esFyItk6/Dia69QZ8z2zTNKohBHZ5mdX7MF2PJDFDMg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 4 Apr 2024 00:51:31 +0200 Message-Id: <20240403225134.31764-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240403225134.31764-1-michael@niedermayer.cc> References: <20240403225134.31764-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/5] avformat/iamf_parse: Check sound_system X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: index 13 out of bounds for type 'const struct IAMFSoundSystemMap [13]' Fixes: 67796/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-4554553191104512 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/iamf_parse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index 3867adb1172..f8074c2de1c 100644 --- a/libavformat/iamf_parse.c +++ b/libavformat/iamf_parse.c @@ -934,6 +934,10 @@ static int mix_presentation_obu(void *s, IAMFContext *c, AVIOContext *pb, int le if (submix_layout->layout_type == 2) { int sound_system; sound_system = (byte >> 2) & 0xF; + if (sound_system >= FF_ARRAY_ELEMS(ff_iamf_sound_system_map)) { + ret = AVERROR_INVALIDDATA; + goto fail; + } av_channel_layout_copy(&submix_layout->sound_system, &ff_iamf_sound_system_map[sound_system].layout); } -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".