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 2376E45045 for ; Sun, 23 Jun 2024 23:01:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A7D5B68D62B; Mon, 24 Jun 2024 02:01:47 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 00E9D68D42E for ; Mon, 24 Jun 2024 02:01:40 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3A7451BF204 for ; Sun, 23 Jun 2024 23:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1719183700; 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=qk20pUiVkb5Oo1DovfyhpqnOtcfrCMaRHvN3YGnVH7s=; b=pHnH2G0QfSdR7hTKSBEx2SUIaaNBBBr6AlDazuDcS8Xk8A+pL6TIN3oby+ipC+jHYEXjIm tjRw/06loyYom6CmOrrZzkxFyve50pNoXZ/SaqlaQDqRPVNhlO3VNoMWJz55I/N3NLBwMs LTbdaNTS3uIYLNMKSQRD6PT4WZsx/XqX8nmT+1GhHP+2FF50uB0rOExx6ohWUbcP+yfnYd gaAKsI+80TH8BT4aXoVj6Nn42PLzpofBmp5gCiS1HGAWQTeexCdWpnNnZRbH40c3wqQNei A3e41KGwmMwHR01indokEecqWfqWPEWUGiSTstH/EqZFFDYxG7QzrFpsEBm0+Q== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 24 Jun 2024 01:01:34 +0200 Message-ID: <20240623230137.1749178-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240623230137.1749178-1-michael@niedermayer.cc> References: <20240623230137.1749178-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/5] avcodec/hevc/hevcdec: Do not allow changes to parameter sets between slices 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: The slice code detects changes by comparing the pps index. That way the code cannot detect changes if the sets can change. Fixes: out of array access Fixes: 69585/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6389604524556288 Fixes: 69601/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5069068613255168 Fixes: 69621/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6187334182174720 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/hevc/hevcdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index 1d2e53afc32..d68d454537a 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -3221,17 +3221,20 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) ret = ff_hevc_decode_nal_vps(&gb, s->avctx, &s->ps); if (ret < 0) goto fail; + s->sh.pps_id = -1; break; case HEVC_NAL_SPS: ret = ff_hevc_decode_nal_sps(&gb, s->avctx, &s->ps, s->apply_defdispwin); if (ret < 0) goto fail; + s->sh.pps_id = -1; break; case HEVC_NAL_PPS: ret = ff_hevc_decode_nal_pps(&gb, s->avctx, &s->ps); if (ret < 0) goto fail; + s->sh.pps_id = -1; break; case HEVC_NAL_SEI_PREFIX: case HEVC_NAL_SEI_SUFFIX: -- 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".