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 AA0AF4D915 for ; Thu, 3 Jul 2025 02:01:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id A9F4C68E51F; Thu, 3 Jul 2025 05:01:41 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 10C7B68E4E7 for ; Thu, 3 Jul 2025 05:01:35 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 594DA41C7C for ; Thu, 3 Jul 2025 02:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1751508094; 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=Y4oukujYN/1crVcKuWeiHs1CvoDI+YqHzhxd2hoyNsk=; b=E9zqUNnydWqeML4rUVuODrr42ZYCXtSAKIyuISI7Dnrl4CicZe7qFHvd36VkwF662T4soy kjWVBdoHLEAxgBoqB4gfOGp3lqK6C+3so5WfUrcQSmUdf+gMpJn/FSoXEeOaDgzVCTZ401 0HILuszS5e00UFckCEZK8AC3vLZ6J3ugewQtKlZmQANkL74bIfCu52RvAydFs8P8DEOwU5 S5WjnqKwsyQJ0u3S4WBMEIkxS04XoE4Ec87JyH1Kd6vMLsDplGAjXKCRtgHhbF1IMX3i25 zMVhFi5Mnm3DCbVZE4ioBfOJEZfhgSrQMG+TUVZqD5VcWyOzFF4/pBTS7PiPHQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 3 Jul 2025 04:01:28 +0200 Message-ID: <20250703020131.2506428-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250703020131.2506428-1-michael@niedermayer.cc> References: <20250703020131.2506428-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduledtvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepgeejhfetgefhgfeludegvdduvdffgeefvddtheetlefhueeitdevffevfeehhefgnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieeirddvvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieeirddvvdejpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/5] avcodec/smacker: Check input before allocation 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: Timeout Fixes: 421650030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-6144441767493632 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/smacker.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index bd08bc7be28..99009bfd361 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -662,6 +662,10 @@ static int smka_decode_frame(AVCodecContext *avctx, AVFrame *frame, } else values[i] = h.entries[0].value; } + if (get_bits_left(&gb) < (stereo+1) * (bits+1) * 8) { + ret = AVERROR_INVALIDDATA; + goto error; + } if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; -- 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".