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 582394C113 for ; Tue, 29 Jul 2025 21:51:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id EF22068C397; Wed, 30 Jul 2025 00:51:52 +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 A36BC687D46 for ; Wed, 30 Jul 2025 00:51:46 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 5FAFF1F68F for ; Tue, 29 Jul 2025 21:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1753825905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EdbdntgGB3N2LD6s2TGcvIQurDJjObABLtDaOcq6cq4=; b=BdQwbejgTyBcM5H5hIdxI7Cy5gniZGz6qiPkdGHop6ISY0OTdXroLIFzGENxeFwen7xDsi ysCv21oCRmZhjTpLNOsXw8yt9O27McGI1qSyYaVECBkPM5JbH7ZrMX5RrwsYuxLw0quUd5 joH16hxWzmW8d3JxQxYlEoq+6ekjCgvh7Wm/yCAJiTJGEgONUhSHzQixJPXG7a04CpbwuY P8faKpIgW5aiXQ8now5su9Ye/Vh+e1/uJO50myAcPlBEL+h8yqFMOVh962BOqyI0Z92qgB W5ID9q031QWSuKospmE1hcW67Oaoj6EUrNJD0JthmWBo1s1hv96WL0pvDdWQ3g== Date: Tue, 29 Jul 2025 23:51:44 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250729215144.GM29660@pb2> References: <20250621211521.895204-1-michael@niedermayer.cc> <20250621211521.895204-5-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: <20250621211521.895204-5-michael@niedermayer.cc> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdeliedukecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnheptefggedvffeiueffvefhiedtgfefjedukeefgeetgeevgeejgeekvdevjeelveeknecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieehrddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieehrddujeeipdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 5/5] avcodec/cbs_apv_syntax_template: Check tile_data_size 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: multipart/mixed; boundary="===============8407303391100284746==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8407303391100284746== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XXK8/ey3uU9ET8RJ" Content-Disposition: inline --XXK8/ey3uU9ET8RJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 21, 2025 at 11:15:21PM +0200, Michael Niedermayer wrote: > Fixes: heap-buffer-overflow > Fixes: 418421333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fu= zzer-6592025183191040 > Fixes: 418804929/clusterfuzz-testcase-minimized-ffmpeg_BSF_APV_METADATA_f= uzzer-5773904646045696 > Fixes: 420737045/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fu= zzer-5535272169439232 >=20 > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/t= ree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/cbs_apv_syntax_template.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/libavcodec/cbs_apv_syntax_template.c b/libavcodec/cbs_apv_sy= ntax_template.c > index fc8a08ff31d..b84565b1076 100644 > --- a/libavcodec/cbs_apv_syntax_template.c > +++ b/libavcodec/cbs_apv_syntax_template.c > @@ -236,6 +236,8 @@ static int FUNC(tile)(CodedBitstreamContext *ctx, RWC= ontext *rw, > #ifdef READ > int pos =3D get_bits_count(rw); > av_assert0(pos % 8 =3D=3D 0); > + if (get_bits_left(rw) < 8LL * comp_size) > + return AVERROR_INVALIDDATA; > current->tile_data[c] =3D (uint8_t*)align_get_bits(rw); > skip_bits_long(rw, 8 * comp_size); > #else will apply there has been a similar patch posted to ffmpeg-security that adds this err= or message: + av_log(ctx->log_ctx, AV_LOG_ERROR, + "Tile component size %u exceeds unit data remaining " \ + "(%d bytes left for %u declared).\n", + comp_size, get_bits_left(rw) / 8, comp_size); what do people think of this ? should we add more detailed error messages ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The educated differ from the uneducated as much as the living from the dead. -- Aristotle=20 --XXK8/ey3uU9ET8RJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaIlCaQAKCRBhHseHBAsP q0x/AJ4v1Zc/2wrnEusyyTQOmtbGQSbMEgCgg3HsdcVRqbW7hdp9QuiPeY145bg= =uoEV -----END PGP SIGNATURE----- --XXK8/ey3uU9ET8RJ-- --===============8407303391100284746== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============8407303391100284746==--