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 4ABA746946 for ; Thu, 19 Jun 2025 03:05:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id DC63768D6D2; Thu, 19 Jun 2025 06:04:45 +0300 (EEST) Received: from relay16.mail.gandi.net (relay16.mail.gandi.net [217.70.178.236]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 1119168C2A6 for ; Thu, 19 Jun 2025 06:04:37 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 41F9744A05 for ; Thu, 19 Jun 2025 03:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1750302276; 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=jgFykQFU0+cLVU7gCHcpR7mGxLxqDFG+TNeMprMw//I=; b=bJ6+MIPQZ47elpUOUaxZ24dmTldwWqqXjxcjLIY4dNfJEsvGKaje9ml1qI58r8zH0M5kEN rKTjJGP95/7EeP1MwIusVmyk0wpNJVALp/j59lYk/tA2M0D1fhDKqrmY1iYIIZh8eGazIy yfUpxK3Un9ILaR6MrXuFq2TvYrFQf2VghubAcT6nnv8U20oeP7niT1pFxvmJJwg1VIDScm thXsRHXfnWfcPHjX09+nkILAlowvdThRjKo+mi5HACGldNS+9Nj3rmhFjoHazbxCEdumgZ KbJg1W7xP3a57TRoar7virSs7087CGhCWbEGWaMpxvgQ/HMV3v8D8zQosohjjQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 19 Jun 2025 05:04:30 +0200 Message-ID: <20250619030432.2977718-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250619030432.2977718-1-michael@niedermayer.cc> References: <20250619030432.2977718-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdegfeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeegjefhteeghffgledugedvuddvffegfedvtdehteelhfeuiedtveffveefheehgfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh Subject: [FFmpeg-devel] [PATCH 3/4] avcodec/sanm: Check w, h for subversion < 2 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: 410609432/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SANM_fuzzer-4935159201988608 Fixes: out of array access Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/sanm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c index 642ef02bff2..02bb78859a8 100644 --- a/libavcodec/sanm.c +++ b/libavcodec/sanm.c @@ -1670,6 +1670,8 @@ static int process_frame_obj(SANMVideoContext *ctx, GetByteContext *gb) /* Rebel Assault 1: 384x242 internal size */ xres = 384; yres = 242; + if (w > xres || h > yres) + return AVERROR_INVALIDDATA; ctx->have_dimensions = 1; } else if (codec == 37 || codec == 47 || codec == 48) { /* these codecs work on full frames, trust their dimensions */ -- 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".