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 DFC3347062 for ; Tue, 25 Jul 2023 20:42:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DD88668C85E; Tue, 25 Jul 2023 23:41:57 +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 7B5E668C7B6 for ; Tue, 25 Jul 2023 23:41:51 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B78DB40002 for ; Tue, 25 Jul 2023 20:41:50 +0000 (UTC) Date: Tue, 25 Jul 2023 22:41:49 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230725204149.GS7802@pb2> References: <20230725004609.17750-1-michael@niedermayer.cc> <20230725004609.17750-3-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid an unchecked bytesteram read 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="===============8632469258074136324==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8632469258074136324== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DIYaQRZjygY6fA2m" Content-Disposition: inline --DIYaQRZjygY6fA2m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 24, 2023 at 11:28:20PM -0300, James Almer wrote: > On 7/24/2023 9:46 PM, Michael Niedermayer wrote: > > The unchecked read caused the 2nd subsequent tell call to move backward= resulting > > in a negative length > >=20 > > Fixes: assertion failure > > Fixes: 60276/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fu= zzer-5434126636023808 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/cbs_h2645.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c > > index 34c5d1d372..21c8bc76d5 100644 > > --- a/libavcodec/cbs_h2645.c > > +++ b/libavcodec/cbs_h2645.c > > @@ -695,7 +695,7 @@ static int cbs_h2645_split_fragment(CodedBitstreamC= ontext *ctx, > > int nal_unit_type =3D bytestream2_get_byte(&gbc) & 0x1f; > > unsigned int num_nalus =3D 1; > > if(nal_unit_type !=3D VVC_DCI_NUT && nal_unit_type !=3D V= VC_OPI_NUT) > > - num_nalus =3D bytestream2_get_be16u(&gbc); > > + num_nalus =3D bytestream2_get_be16(&gbc); > > start =3D bytestream2_tell(&gbc); > > for(i =3D 0; i < num_nalus; i++) { >=20 > LGTM. will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "You are 36 times more likely to die in a bathtub than at the hands of a terrorist. Also, you are 2.5 times more likely to become a president and 2 times more likely to become an astronaut, than to die in a terrorist attack." -- Thoughty2 --DIYaQRZjygY6fA2m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZMAzjQAKCRBhHseHBAsP qx/9AJ0Thzy01b97qnxj10jwHA2HvSIB7gCeJxajKjjGqkwoRUJgqu+VqaMmjIc= =C4T+ -----END PGP SIGNATURE----- --DIYaQRZjygY6fA2m-- --===============8632469258074136324== 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". --===============8632469258074136324==--