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 9C089499AF for ; Tue, 26 Mar 2024 02:31:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D6B3A68D5FD; Tue, 26 Mar 2024 04:31:10 +0200 (EET) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AE32968D4CB for ; Tue, 26 Mar 2024 04:31:01 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1567060003 for ; Tue, 26 Mar 2024 02:31:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1711420261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=fdT2Bwzkhm2MMFKN97ohtuZM8D1vveMJb/YP6oRrrTo=; b=UF22l3rrhHXF3WN57UlUaGqJteqLvRLjI8hpPTCyc32K51V39frewUrgF1zf1x6dmTs7pO lVL7m3e8hERhR1ksFfvT3Hdyw+CMn2gCOg9u170m//8nENuHXytIdc++5nyanam0FhU51l 1G5PeIYXQpGAur8eVEO0pRQetHUyYgwZtAcJ67m6ckzPBZJcpoCUHGygJK0KhapIQmDUAf GifD4c1iREV+twVgWFwoPutqvoXNMlEG5QCH8TMryVsIljFMbdDygCiW0nDqEEgEeqt78M r53wIrNcPgpqmZjK60tTfOHbKgk7yrqJ4cKcApcSkreprQee+rokFQiAuL3f3w== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 26 Mar 2024 03:30:54 +0100 Message-Id: <20240326023056.20548-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240326023056.20548-1-michael@niedermayer.cc> References: <20240326023056.20548-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/7] avcodec/truemotion1: Height not being a multiple of 4 is unsupported 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 MIME-Version: 1.0 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: mb_change_bits is given space based on height >> 2, while more data is read Fixes: out of array access Fixes: 62285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION1_fuzzer-5201925062590464.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/truemotion1.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c index 6b0ee225691..784576d01b3 100644 --- a/libavcodec/truemotion1.c +++ b/libavcodec/truemotion1.c @@ -408,6 +408,11 @@ static int truemotion1_decode_header(TrueMotion1Context *s) return AVERROR_PATCHWELCOME; } + if (s->h & 3) { + avpriv_request_sample(s->avctx, "Frame with height not being a multiple of 4"); + return AVERROR_PATCHWELCOME; + } + if (s->w != s->avctx->width || s->h != s->avctx->height || new_pix_fmt != s->avctx->pix_fmt) { av_frame_unref(s->frame); -- 2.17.1 _______________________________________________ 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".