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 1213449185 for ; Sun, 5 May 2024 01:34:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2FA1368D590; Sun, 5 May 2024 04:34:35 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 912DE68D552 for ; Sun, 5 May 2024 04:34:28 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C43EB40003 for ; Sun, 5 May 2024 01:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714872867; 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=FVFOrN/16gHgA3KvAI5I5R2hYABNijanNANKxTIGMLE=; b=QMnwDdmm+drpaCi3DE2WyYhY2/7N0zZoGsA6nwsPziug0HWp+JJbJrCixrNunXOBs8TmlL hqS2Tj2bjx23lSkByTntUgIAf5ktrVgd1f6zNbYVRi71rttC1xBfFgAScORYIYjXUptXbH KkxX/MC1DDlhxx9NOPGyUNoz2ap2LgjcIO0G8UHZr8c04WC29x7zOafD3nDNCeZm0frcrK wnW+dkhXW3cEOyOaLcyh3ZNoPNZSpdr35LZ4K9Je/LisuX6ftzkcOL9MAELeboG5WKuu5/ s8q7Lp8abTW7Qt00/mb1COSTub3iQsCGtpRpAwVPuW9AaYJs3wyXab7qL/2x1w== Date: Sun, 5 May 2024 03:34:26 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240505013426.GX6420@pb2> References: <20240426030839.3001504-1-michael@niedermayer.cc> <20240426030839.3001504-6-michael@niedermayer.cc> <50f3106fa2d0be801e5843a2f55576cddd2985a9.camel@haerdin.se> MIME-Version: 1.0 In-Reply-To: <50f3106fa2d0be801e5843a2f55576cddd2985a9.camel@haerdin.se> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 6/6] avformat/mxfdec: Check body_offset 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="===============6009466480095868090==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6009466480095868090== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n+dz/TeHg9ByiSgG" Content-Disposition: inline --n+dz/TeHg9ByiSgG Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 29, 2024 at 10:25:33PM +0200, Tomas H=E4rdin wrote: > fre 2024-04-26 klockan 05:08 +0200 skrev Michael Niedermayer: > > Fixes: signed integer overflow: 538976288 - -9223372036315799520 > > cannot be represented in type 'long' > > Fixes: 68060/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer- > > 5523457266745344 > >=20 > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > =A0libavformat/mxfdec.c | 3 +++ > > =A01 file changed, 3 insertions(+) > >=20 > > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c > > index 233d614f783..e65cec74c23 100644 > > --- a/libavformat/mxfdec.c > > +++ b/libavformat/mxfdec.c > > @@ -791,6 +791,9 @@ static int mxf_read_partition_pack(void *arg, > > AVIOContext *pb, int tag, int size > > =A0=A0=A0=A0 partition->index_sid =3D avio_rb32(pb); > > =A0=A0=A0=A0 partition->body_offset =3D avio_rb64(pb); > > =A0=A0=A0=A0 partition->body_sid =3D avio_rb32(pb); > > +=A0=A0=A0 if (partition->body_offset < 0) > > +=A0=A0=A0=A0=A0=A0=A0 return AVERROR_INVALIDDATA; >=20 > The spec says BodyOffset is UInt64, so this means we drop support for > files >=3D 2^63 bytes. This is probably fine though. Supporting such > large files would be a pain in more places than here. >=20 > MXF is sometimes used to archive scanned copies of film, but even raw > 16k rgb48 essence @ 120 Hz takes over 1000 days of footage to hit the > 2^63 limit.. >=20 > I took a look at the body_offset logic and it looks like it should be > correct when we force them to be non-negative. >=20 > TL;DR: looks OK will apply will also apply 2,3,5 of this set thanks [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus --n+dz/TeHg9ByiSgG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZjbiHwAKCRBhHseHBAsP q7kLAJ96OBlPwkmWTqpsv2XLtMUuSsYtvQCgml1jsZxLvywlL8N1KA7t38haGBo= =Zap/ -----END PGP SIGNATURE----- --n+dz/TeHg9ByiSgG-- --===============6009466480095868090== 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". --===============6009466480095868090==--