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 979284BFDC for ; Sat, 20 Jul 2024 00:53:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F40C768DA2D; Sat, 20 Jul 2024 03:52:55 +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 A49B168D8EC for ; Sat, 20 Jul 2024 03:52:46 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1752EE0005 for ; Sat, 20 Jul 2024 00:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1721436766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TZjvhaKj6snGc2/Iajjn+sqR+AK1G68HKDcBmJqx6zA=; b=DI8edWTCIoxcsuUpWqwPGp2q1mw1s3qCoQuUktf6vgmMe9PhtvVaX8So8RxyaIL04K7wri AnM+l9KJnD9TD8x5dthsVChyG+XOgFVrhdqFBzd+PRj0ZrwnbeALabhVgCwrWD4eWZQGRA gxUxsOKpDvKllzO1cYI6jlpJEN+CzKLgvrd2GWuh6EJtKsheMdbdEYp/FYeW7ERqUHvnme wZXKLWix9LTOFrf5FAE1D4kZRlYH6Pm0HmOYOX+BBCV43fvtGkRmDA5e3KvINSwbVwTtvk woIFdbgyaIPGzu5ls73zYu8qDKIYhxV6NdMRDr0wSBehMiN36zGa2AYoBaAr9g== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 20 Jul 2024 02:52:35 +0200 Message-ID: <20240720005241.726089-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240720005241.726089-1-michael@niedermayer.cc> References: <20240720005241.726089-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 05/11] avcodec/aac/aacdec_lpd: Check kv indec 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 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 9 out of bounds for type 'uint32_t [8][8]' Fixes: 70363/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-6723855293415424.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/aac/aacdec_lpd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/aac/aacdec_lpd.c b/libavcodec/aac/aacdec_lpd.c index 91a32688895..20bbb007ff3 100644 --- a/libavcodec/aac/aacdec_lpd.c +++ b/libavcodec/aac/aacdec_lpd.c @@ -130,6 +130,9 @@ int ff_aac_parse_fac_data(AACUsacElemData *ce, GetBitContext *gb, if (use_gain) ce->fac.gain = get_bits(gb, 7); + if (len/8 > 8) + return AVERROR_PATCHWELCOME; + for (int i = 0; i < len/8; i++) { ret = parse_codebook_idx(gb, ce->fac.kv[i], 1, 1); if (ret < 0) -- 2.45.2 _______________________________________________ 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".