From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 03A2E44B49 for ; Sat, 21 Jun 2025 21:16:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 4F14A68CF3C; Sun, 22 Jun 2025 00:15:37 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 2E2DF68CDC3 for ; Sun, 22 Jun 2025 00:15:28 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7F6B2442E8 for ; Sat, 21 Jun 2025 21:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1750540527; 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=cwgGUgN87A52dJeKPvjckkz1mplqROVKtgsY+LTY1Y0=; b=b6/Wj6cyHeyBBKYFjrWvnSupdh9HpL+R4yTssTlkPbr4dRHdPddQfsMcC1jOvS0X7Rpgid Z4j2xBZK+JTarHTIlLgXVpBt1OurqQ0ray1lVwOLhnhoyf5+yOTHbiS85t68mztjLhr3tx gBFo+sSYuYJn5IwgOR+1DAoMCUMc7maps43hllylfJiK8rbkwcIqif22sZOZnxHq2irh4E 1Yk53MvmPQMzDDYKxNcE9CebCWMOnY6WJzfY8Fjk0zk1b1fyf+zlzU7JVBQW7q8L1TWCgP dYVIb5Jpin+d5ubgsK5se3oRJh4pMLjckLPEYHrkWtSHho3w0hOwssqFrP1bTA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 21 Jun 2025 23:15:21 +0200 Message-ID: <20250621211521.895204-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250621211521.895204-1-michael@niedermayer.cc> References: <20250621211521.895204-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdduvdeffecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepgeejhfetgefhgfeludegvdduvdffgeefvddtheetlefhueeitdevffevfeehhefgnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/cbs_apv_syntax_template: Check tile_data_size 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: heap-buffer-overflow Fixes: 418421333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-6592025183191040 Fixes: 418804929/clusterfuzz-testcase-minimized-ffmpeg_BSF_APV_METADATA_fuzzer-5773904646045696 Fixes: 420737045/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-5535272169439232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/cbs_apv_syntax_template.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/cbs_apv_syntax_template.c b/libavcodec/cbs_apv_syntax_template.c index fc8a08ff31d..b84565b1076 100644 --- a/libavcodec/cbs_apv_syntax_template.c +++ b/libavcodec/cbs_apv_syntax_template.c @@ -236,6 +236,8 @@ static int FUNC(tile)(CodedBitstreamContext *ctx, RWContext *rw, #ifdef READ int pos = get_bits_count(rw); av_assert0(pos % 8 == 0); + if (get_bits_left(rw) < 8LL * comp_size) + return AVERROR_INVALIDDATA; current->tile_data[c] = (uint8_t*)align_get_bits(rw); skip_bits_long(rw, 8 * comp_size); #else -- 2.49.0 _______________________________________________ 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".