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 7320044EF1 for ; Sun, 28 May 2023 21:03:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A6E0E68C1AC; Mon, 29 May 2023 00:03:20 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1572268BF5E for ; Mon, 29 May 2023 00:03:14 +0300 (EEST) X-GND-Sasl: michael@niedermayer.cc Received: by mail.gandi.net (Postfix) with ESMTPSA id 44EF220002 for ; Sun, 28 May 2023 21:03:12 +0000 (UTC) Date: Sun, 28 May 2023 23:03:12 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230528210312.GQ1391451@pb2> References: <20230525214019.29048-1-michael@niedermayer.cc> <9b48247-5fc5-7824-5da9-823d34919252@passwd.hu> MIME-Version: 1.0 In-Reply-To: <9b48247-5fc5-7824-5da9-823d34919252@passwd.hu> Subject: Re: [FFmpeg-devel] [PATCH 1/5] avformat/mov: We do not support creation times of 300 billion years ago 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="===============1888067651810472933==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1888067651810472933== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cmxQ2a0XYZsSJXeB" Content-Disposition: inline --cmxQ2a0XYZsSJXeB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 28, 2023 at 08:53:49PM +0200, Marton Balint wrote: >=20 >=20 > On Thu, 25 May 2023, Michael Niedermayer wrote: >=20 > > Fixes: signed integer overflow: -9223372036854775808 - 2082844800 canno= t be represented in type 'long' > > Fixes: 58384/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-64283= 83700713472 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/mov.c | 4 ++++ > > 1 file changed, 4 insertions(+) > >=20 > > diff --git a/libavformat/mov.c b/libavformat/mov.c > > index 9fdeef057e..3e2c4bc10d 100644 > > --- a/libavformat/mov.c > > +++ b/libavformat/mov.c > > @@ -1530,6 +1530,10 @@ static void mov_metadata_creation_time(MOVContex= t *c, AVIOContext *pb, AVDiction > > } > > } > > if (time) { > > + if (time < INT64_MIN + 2082844800) { > > + av_log(c->fc, AV_LOG_DEBUG, "creation_time predates big ba= ng\n"); > > + return; > > + } >=20 > Actually creation_time is unsigned, so it cannot be negative. I suggest y= ou > simply reject everyting less than 0 here. You should also move the check = to > the version =3D=3D 1 case, because only that can read a "negative" value. ok will apply with these changes thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data --cmxQ2a0XYZsSJXeB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZHPBjAAKCRBhHseHBAsP q5PEAJ47cmuWD4E7HTO/j7Ku3/QVEkciHQCfX41AiaDuJSsuxoxNgkxsvgZSPiU= =SQs+ -----END PGP SIGNATURE----- --cmxQ2a0XYZsSJXeB-- --===============1888067651810472933== 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". --===============1888067651810472933==--