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 6FA474BE10 for ; Sat, 21 Jun 2025 21:16:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id DDE5468CE36; Sun, 22 Jun 2025 00:15:33 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id D941F68CA66 for ; Sun, 22 Jun 2025 00:15:25 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 180E84326B for ; Sat, 21 Jun 2025 21:15:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1750540525; 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=efFn/CS6OEtMh7kLf03Q5BRLAnMPtMl5ztKiKH/Ogbs=; b=V8ifqzbxPvtO5QJVljI0RYC9Z0SwkH0L7Zo9F7n91eW7gmnEOEwepk3uZPg5154tjAVnFS i0IgpkiEiNh8l5lmJkNvwqw3ieCHcZOu+admuhfYidMRvq6hpBaCK3lrQ7eq//WOXmCsLb SwYZYqbsrKg40YheaOT9MN/v3byIfXjXAw5KThnerrj4qhJsPKQmrcduPkEgJ25Y16Odie 4fLB40K6UtxMjrC+S79K4FRjpezB2RP56XaTIyR2fkztfjfjYZi0K7joXLlp3DYXG0DNtz voXlZ7NaJQair+6HoM20V8LfXc/tNEjNV0s5Iwa3tccv0s9xEuSo/4jurteZHQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 21 Jun 2025 23:15:19 +0200 Message-ID: <20250621211521.895204-3-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 3/5] avcodec/rv60dec: Check sum in read_slice_sizes() 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: signed integer overflow: 2147483647 + 1913651185 cannot be represented in type 'int' Fixes: 418335931/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV60_fuzzer-6568264620900352 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/rv60dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/rv60dec.c b/libavcodec/rv60dec.c index 2bbcb1d6209..dbafa7eed02 100644 --- a/libavcodec/rv60dec.c +++ b/libavcodec/rv60dec.c @@ -409,6 +409,8 @@ static int read_slice_sizes(RV60Context *s, GetBitContext *gb) if (last_size <= 0) return AVERROR_INVALIDDATA; s->slice[i].size = last_size; + if (s->slice[i].size > INT32_MAX - sum) + return AVERROR_INVALIDDATA; sum += s->slice[i].size; } -- 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".