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 EA5654CA18 for ; Mon, 12 Aug 2024 19:44:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0EACF68D9BB; Mon, 12 Aug 2024 22:43:59 +0300 (EEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1483168D93B for ; Mon, 12 Aug 2024 22:43:52 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 28991E0003 for ; Mon, 12 Aug 2024 19:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1723491831; 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=hKLwmTnDZ6NbEH7aU6Oy3p+kQcrxRiY/UBV5gGUPruw=; b=ZLSTkbjIC/E3p2vdbMkKWm9MV3sYW8pAhR9pwIl7qoadOW9tq8gxvldWO3bxEAbCmfIBgr prJYPNsErvFF7kOLq13F6Q5BJhX0rvAZCXreGAwdOYcdT5vwflXHKywGZLlo9UFCWk+xbQ RF1eMFLBxDT7ItAkZbbUZ4NckK3zveWI3HPKE8N6rigQKu7VOKo3P7xz+b/z+3LvTQnijF ux8EFWuqe3v500UbLd3jQM890FZS39+o/NUQSd6u5RTV1FoP+HDAgec7TiQd7cJBppHBL5 9ESaYewsSntFX/KXlMSAu0jf7q7Z3mZAa6ho0DCBde8mxeQTgjtCoMt502mkqA== Date: Mon, 12 Aug 2024 21:43:50 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240812194350.GN4991@pb2> References: <20240807235333.2148870-1-michael@niedermayer.cc> <20240807235333.2148870-2-michael@niedermayer.cc> <011aa19c-d4dd-4dec-b7e6-3243187a215f@jkqxz.net> MIME-Version: 1.0 In-Reply-To: <011aa19c-d4dd-4dec-b7e6-3243187a215f@jkqxz.net> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] cbs_vp9: Ensure that the two superframe_header instances are identical 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="===============8028742342052756570==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8028742342052756570== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="B+rOXCo5y3P4mzNn" Content-Disposition: inline --B+rOXCo5y3P4mzNn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 11, 2024 at 07:17:25PM +0100, Mark Thompson wrote: > Fixes: use of uninitialized value > Fixes: 70907/clusterfuzz-testcase-minimized-ffmpeg_BSF_VP9_METADATA_fuzze= r-6339363208757248 >=20 > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/t= ree/master/projects/ffmpeg > --- > On 11/08/2024 19:05, Mark Thompson wrote: > > The correct fix therefore would be to constrain the second read values = to be identical to the first, not to introduce new syntax elements not in t= he standard to cover the invalid case. >=20 > Like this. (Marked in the same way as your suggested patch based on my a= ssumption that it fixes the problem - please check.) >=20 > Trace output is correct in the normal case, and catches the error in the = bad one: >=20 > [trace_headers @ 0x55a0f5decb40] Packet: 11971 bytes, pts 366, dts 366. > [trace_headers @ 0x55a0f5decb40] Superframe Index > [trace_headers @ 0x55a0f5decb40] 0 superframe_marker = 110 =3D 6 > [trace_headers @ 0x55a0f5decb40] 3 bytes_per_framesize_minus_1 = 01 =3D 1 > [trace_headers @ 0x55a0f5decb40] 5 frames_in_superframe_minus_1= 001 =3D 1 > [trace_headers @ 0x55a0f5decb40] 8 frame_sizes[0] = 1011110000101110 =3D 11964 > [trace_headers @ 0x55a0f5decb40] 24 frame_sizes[1] = 0000000100000000 =3D 1 > [trace_headers @ 0x55a0f5decb40] 40 superframe_marker = 110 =3D 6 > [trace_headers @ 0x55a0f5decb40] 43 bytes_per_framesize_minus_1 = 01 =3D 1 > [trace_headers @ 0x55a0f5decb40] 45 frames_in_superframe_minus_1= 001 =3D 1 >=20 > or >=20 > [trace_headers @ 0x555af04d7b40] Packet: 11971 bytes, pts 366, dts 366. > [trace_headers @ 0x555af04d7b40] Superframe Index > [trace_headers @ 0x555af04d7b40] 0 superframe_marker = 110 =3D 6 > [trace_headers @ 0x555af04d7b40] 3 bytes_per_framesize_minus_1 = 01 =3D 1 > [trace_headers @ 0x555af04d7b40] 5 frames_in_superframe_minus_1= 001 =3D 1 > [trace_headers @ 0x555af04d7b40] 8 frame_sizes[0] = 1011110000101110 =3D 11964 > [trace_headers @ 0x555af04d7b40] 24 frame_sizes[1] = 0000000100000000 =3D 1 > [trace_headers @ 0x555af04d7b40] 40 superframe_marker = 110 =3D 6 > [trace_headers @ 0x555af04d7b40] 43 bytes_per_framesize_minus_1 = 10 =3D 2 > [trace_headers @ 0x555af04d7b40] bytes_per_framesize_minus_1 out of range= : 2, but must be in [1,1]. > [vost#0:0/copy @ 0x555af0538400] Error applying bitstream filters to a pa= cket: Invalid data found when processing input >=20 > Thanks, >=20 > - Mark >=20 > libavcodec/cbs_vp9_syntax_template.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) If its intended that this will discard cases where they differ then your patch is probably ok thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship naturally arises out of democracy, and the most aggravated form of tyranny and slavery out of the most extreme liberty. -- Plato --B+rOXCo5y3P4mzNn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZrpl8gAKCRBhHseHBAsP q5iwAKCN2p9aoFb/UbDjy4nakbxWmStL2QCcCY9szJmREfGU40RwZI7gppxnjFI= =h10g -----END PGP SIGNATURE----- --B+rOXCo5y3P4mzNn-- --===============8028742342052756570== 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". --===============8028742342052756570==--