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 CB6294AB7C for ; Fri, 20 Jun 2025 00:34:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 2CD7868DAF0; Fri, 20 Jun 2025 03:33:12 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 46B9268DB19 for ; Fri, 20 Jun 2025 03:33:02 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 916751F433 for ; Fri, 20 Jun 2025 00:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1750379581; 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=5B0CCKM7TntKVmLFeVN9dvg9j8/vSjEAQXlgGV7yzrA=; b=J0ibI40Q2CJr+IVucblYCWPwLBcUjIlTgUCMbx2NKH4siFuhgup48IeOwbjXb1OLYVqclO CBrsuXsqTZAwtiqRQZOaKiYM8j4x8djE5jO9lL8k1ti0JDlYETF0TFYjcHEVrOjWlaOz/f mrILWOx7M9JqnABbaY2uZyeJs0Zy39e+mc8OEFHr6rA9bSj99bMeVpFXgsZZaxrcJId0nS 8yahej77IZDAQ4enlEtH69qrzfSTeZzUOm9rgS27QJr60XgCP3mKYcF9t8Ycr+UQpQ0Bev cagjpAEQkD0CjiATCkoIztDknI/v565MXihsqbA/Q5X/f5cgkVcu/+BEc8M+GQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 20 Jun 2025 02:32:53 +0200 Message-ID: <20250620003255.295598-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250620003255.295598-1-michael@niedermayer.cc> References: <20250620003255.295598-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdeileejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeegjefhteeghffgledugedvuddvffegfedvtdehteelhfeuiedtveffveefheehgfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 6/8] avcodec/vvc/ctu: Check palette_escape_val 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: integer overflow Fixes: 418314174/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4871731867353088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/vvc/ctu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c index ba4c89b1d1b..7fa2b496389 100644 --- a/libavcodec/vvc/ctu.c +++ b/libavcodec/vvc/ctu.c @@ -2053,6 +2053,8 @@ static int palette_subblock_data(VVCLocalContext *lc, const int v = PALETTE_INDEX(xc, yc); if (v == esc) { const int coeff = ff_vvc_palette_escape_val(lc); + if (coeff >= (1U << sps->bit_depth)) + return AVERROR_INVALIDDATA; const int pixel = av_clip_intp2(RSHIFT(coeff * scale, 6), sps->bit_depth); PALETTE_SET_PIXEL(xc, yc, pixel); } else { -- 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".