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 ESMTPS id 529F64BE8F for ; Wed, 22 Jan 2025 08:02:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 38E4968B6A5; Wed, 22 Jan 2025 10:02:26 +0200 (EET) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CE8B168B1FB for ; Wed, 22 Jan 2025 10:02:18 +0200 (EET) Received: from db9113ea98d98dd28eac7beef2464e3c ([1.145.170.244]) (authenticated (0 bits)) by mx.sdf.org (8.18.1/8.14.3) with ESMTPSA id 50M828NQ008261 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Wed, 22 Jan 2025 08:02:14 GMT Date: Wed, 22 Jan 2025 19:02:07 +1100 From: Peter Ross To: ffmpeg-devel@ffmpeg.org Message-ID: Mail-Followup-To: ffmpeg-devel@ffmpeg.org References: <20250121215744.2CBC24126D3@natalya.videolan.org> MIME-Version: 1.0 In-Reply-To: <20250121215744.2CBC24126D3@natalya.videolan.org> Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/wtvdec: Initialize buf 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="===============4648854870845403126==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4648854870845403126== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RzaYIKYZJE2/ysb/" Content-Disposition: inline --RzaYIKYZJE2/ysb/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 21, 2025 at 09:57:43PM +0000, Michael Niedermayer wrote: > ffmpeg | branch: master | Michael Niedermayer | = Thu Dec 26 02:53:45 2024 +0100| [17b019c517af26c6d2f0c6266938c60d36db1fa3] = | committer: Michael Niedermayer >=20 > avformat/wtvdec: Initialize buf >=20 > ff_parse_mpeg2_descriptor() reads over what is initialized > Fixes: use of uninitialized memory > Fixes: 383825645/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-514= 4130618982400 >=20 > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/t= ree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer >=20 > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=3Dcommit;h=3D17b019c51= 7af26c6d2f0c6266938c60d36db1fa3 > --- >=20 > libavformat/wtvdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c > index 730c7fca78..21c9649869 100644 > --- a/libavformat/wtvdec.c > +++ b/libavformat/wtvdec.c > @@ -833,7 +833,7 @@ static int parse_chunks(AVFormatContext *s, int mode,= int64_t seekts, int *len_p > int stream_index =3D ff_find_stream_index(s, sid); > if (stream_index >=3D 0) { > AVStream *st =3D s->streams[stream_index]; > - uint8_t buf[258]; > + uint8_t buf[258] =3D {0}; > const uint8_t *pbuf =3D buf; hi michael, can you help me understand why this is needed... the avio_read() call fills buf, and the call to ff_parse_mpeg2_descriptor specifies an "end" pointer (desc_list_end point) to prevent overreading. where is the uninitialised memory coming from? -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --RzaYIKYZJE2/ysb/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCZ5Cl+gAKCRBnYHnFrEDd awF+AJ4xFoYeFrbCUlZ0fbVka3VHsByBOACgzA8VoqZynAuJJapUsbqiLScKg3g= =VxnM -----END PGP SIGNATURE----- --RzaYIKYZJE2/ysb/-- --===============4648854870845403126== 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". --===============4648854870845403126==--