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 10EF3499A0 for ; Tue, 26 Mar 2024 00:12:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5568E68D5D9; Tue, 26 Mar 2024 02:11:59 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DF7E768D463 for ; Tue, 26 Mar 2024 02:11:52 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 39F43E0002 for ; Tue, 26 Mar 2024 00:11:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1711411912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=lK8fEFv11poqFO3gpQZxdGLGSoBoaIEAcaI8d62mRSU=; b=BTDWLFa8/m+ZCY8Y8YloifOL0oY0t+6bpgKkxZDX3GkbRQF6CYjAEHgqxZjcX9ZOJqu6Cl gxrRSd/jIJ6T8420PytbA+akm/S1W0sLU6ONn/ouPvP1vshxX+s02OHPeWSgU21kXM4xI7 SF9htYjRhLewLNj70dhv9i2skkLo4v3Sl0NqUx0ALq8iRhlRmRAl+h11MKJHUDKkE6LIFY FQO4LssOHsc1kE2lvt9Hk7OAOm67KNdEp0RrolMMHbhRQI8kDBKpAv91VqdkEh0fuJuUvy dHOP/4vS5+e8lquvwHZJKXUwHY4UXvgxHeO+7y2uS7zzIi9q+1F21z4WevTEjQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 26 Mar 2024 01:11:42 +0100 Message-Id: <20240326001151.12083-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 01/10] avformat/concatdec: Check user_duration sum 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: Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-6434245599690752 Fixes: signed integer overflow: 9223372026773000000 + 22337000000 cannot be represented in type 'long' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/concatdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index ac541a592fa..f1401e43530 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -679,6 +679,8 @@ static int concat_read_header(AVFormatContext *avf) cat->files[i].user_duration = cat->files[i].outpoint - cat->files[i].inpoint; } cat->files[i].duration = cat->files[i].user_duration; + if (time + (uint64_t)cat->files[i].user_duration > INT64_MAX) + return AVERROR_INVALIDDATA; time += cat->files[i].user_duration; } if (i == cat->nb_files) { -- 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".