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 BF8A1495B3 for ; Fri, 19 Jul 2024 08:10:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D731068DA3C; Fri, 19 Jul 2024 11:10:44 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2BCBA68DA05 for ; Fri, 19 Jul 2024 11:10:38 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7A4B61BF209 for ; Fri, 19 Jul 2024 08:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1721376637; 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=0/BV2GHy4/w64xxOI0QDviR1oTD1cb2zu3HWFZGRgkQ=; b=UrlfSzTr6NLxd3XS+8TDGGedU7TZhzF9ZqYOQtzwEPIGjcodakXQMYn7KzLMBSlVWw2H5+ fQC0AmAqRwtUkQEubctyoIimSYCCjWqgzQgktvC3lTvj2ItovNHiWaqtM+tW2PsJcy/drn wRJCAMCPqwGPZIGZ1V0dPM3Y2VzVn6akJJ2+NDLzCJqlfPCgwKJixbKTNlKtYVKulAyeog cEkuBEOEWk1EhCkxn5MaqC7tVxsY5xkg5zQCkHIKvrg4sT7ICTLlmaVSWdCkNlfc5sf1ky pBXmLsxhFE3jzxgUnVbii8IDdTTG+z8yInpqifkqzrwwNaRMmoMcatb8Y3aSxA== Date: Fri, 19 Jul 2024 10:10:36 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240719081036.GH4991@pb2> References: <20240718221606.3710874-1-michael@niedermayer.cc> <12436ccb-ffd3-41b8-8c0f-0a694610c92e@gmail.com> MIME-Version: 1.0 In-Reply-To: <12436ccb-ffd3-41b8-8c0f-0a694610c92e@gmail.com> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/mov: Check extradata in mov_read_iacb() 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="===============5384148402498896004==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5384148402498896004== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="59RjlqDzQO7ayMrI" Content-Disposition: inline --59RjlqDzQO7ayMrI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 18, 2024 at 07:19:17PM -0300, James Almer wrote: > On 7/18/2024 7:16 PM, Michael Niedermayer wrote: > > Fixes: MemLeak > > Fixes: 69853/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-46604= 48545275904 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/mov.c | 2 ++ > > 1 file changed, 2 insertions(+) > >=20 > > diff --git a/libavformat/mov.c b/libavformat/mov.c > > index ce95842ce58..82fce7ef5c1 100644 > > --- a/libavformat/mov.c > > +++ b/libavformat/mov.c > > @@ -897,6 +897,8 @@ static int mov_read_iacb(MOVContext *c, AVIOContext= *pb, MOVAtom atom) > > st =3D c->fc->streams[c->fc->nb_streams - 1]; > > sc =3D st->priv_data; > > + if (st->codecpar->extradata) > > + return AVERROR_INVALIDDATA; >=20 > Maybe it's better to do like other atoms where we ignore duplicate entries > (See mov_read_glbl(), used for h264/hevc/etc). IIRC its a mix of mov_read_iacb() and mov_read_stsd() both setting extradata i can certainly do a "return 0" with some warning if you prefer that thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "Nothing to hide" only works if the folks in power share the values of you and everyone you know entirely and always will -- Tom Scott --59RjlqDzQO7ayMrI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZpofdQAKCRBhHseHBAsP qytVAJ9pAAqpSINLUTNT9S1gzaqpVlcJxwCfa9zGP/UyEFVBnS2ED4dm/wD3rLw= =mDls -----END PGP SIGNATURE----- --59RjlqDzQO7ayMrI-- --===============5384148402498896004== 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". --===============5384148402498896004==--