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 EEBDB4476F for ; Thu, 22 Sep 2022 16:28:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D953C68BBE1; Thu, 22 Sep 2022 19:28:25 +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 A23B468B82F for ; Thu, 22 Sep 2022 19:28:19 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id BA649E0005 for ; Thu, 22 Sep 2022 16:28:18 +0000 (UTC) Date: Thu, 22 Sep 2022 18:28:17 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220922162817.GM6583@pb2> References: <20220918171410.31835-1-michael@niedermayer.cc> <20220918171410.31835-13-michael@niedermayer.cc> <166385166529.3205.838741980740358047@lain.khirnov.net> MIME-Version: 1.0 In-Reply-To: <166385166529.3205.838741980740358047@lain.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 13/13] avformat/westwood_vqa: Check chunk size 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="===============0563111299193245856==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0563111299193245856== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8m/hfNLtAhX2NvnO" Content-Disposition: inline --8m/hfNLtAhX2NvnO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 22, 2022 at 03:01:05PM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2022-09-18 19:14:10) > > Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in= type 'int' > > Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-659= 3408795279360 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/westwood_vqa.c | 2 ++ > > 1 file changed, 2 insertions(+) > >=20 > > diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c > > index e3d2e2668c4..bd8df5e0b34 100644 > > --- a/libavformat/westwood_vqa.c > > +++ b/libavformat/westwood_vqa.c > > @@ -274,6 +274,8 @@ static int wsvqa_read_packet(AVFormatContext *s, > > return AVERROR(EIO); > > =20 > > /* the decoder expects chunks to be 16-bit aligned= */ > > + if (wsvqa->vqfl_chunk_size =3D=3D INT_MAX) > > + return AVERROR_INVALIDDATA; >=20 > IIUC this can only happen after the > wsvqa->vqfl_chunk_size > 3 * (1 << 20) > check above was triggered. Then it makes more sense to change that code > to check chunk_size before setting wsvqa->vqfl_chunk_size. i will post a new patch thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them. --8m/hfNLtAhX2NvnO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYyyNHQAKCRBhHseHBAsP q7XoAKCIzrUt9v4/dWmpFrpYQxA7toyn6QCfdnBBLSyUIXltwUgqkASoDTh1TMA= =/Sw5 -----END PGP SIGNATURE----- --8m/hfNLtAhX2NvnO-- --===============0563111299193245856== 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". --===============0563111299193245856==--