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 A6134444C0 for ; Thu, 12 Jan 2023 14:30:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A037768A846; Thu, 12 Jan 2023 16:30:08 +0200 (EET) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF260689B11 for ; Thu, 12 Jan 2023 16:30:01 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 1454C1C0006 for ; Thu, 12 Jan 2023 14:30:00 +0000 (UTC) Date: Thu, 12 Jan 2023 15:29:59 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230112142959.GI1949656@pb2> References: <20230111204221.22550-1-michael@niedermayer.cc> <20230111204221.22550-5-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 5/6] avcodec/bonk: Avoid undefined overflow in quant 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="===============0218548906723912356==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0218548906723912356== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GBuTPvBEOL0MYPgd" Content-Disposition: inline --GBuTPvBEOL0MYPgd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 11, 2023 at 10:06:44PM +0100, Paul B Mahol wrote: > On 1/11/23, Michael Niedermayer wrote: > > Fixes: signed integer overflow: -2889074 * 2048 cannot be represented in > > type 'int' > > Fixes: > > 51363/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-566= 0734784143360 > > Fixes: > > 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-661= 7680050520064 > > Fixes: > > 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-674= 3951854141440 > > > > No check is done for the overflow as this was rejected in last review, = see > > the ML > > > > Note: the 2nd and 3rd testcase was assigned by ossfuzz to a unrelated t= heora > > issue (48567) > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/bonk.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c > > index 5d736b1563..9e176d5477 100644 > > --- a/libavcodec/bonk.c > > +++ b/libavcodec/bonk.c > > @@ -356,7 +356,7 @@ static int bonk_decode(AVCodecContext *avctx, AVFra= me > > *frame, > > sample++; > > } > > > > - sample[0] =3D predictor_calc_error(s->k, state, s->n_taps, > > s->input_samples[i] * quant); > > + sample[0] =3D predictor_calc_error(s->k, state, s->n_taps, > > s->input_samples[i] * (unsigned)quant); > > sample++; > > } > > > > -- > > 2.17.1 > > >=20 > LGTM will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment. --GBuTPvBEOL0MYPgd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY8AZZwAKCRBhHseHBAsP q/MyAJ9IK2QyxlnNFmkwB9Eu2uZuhL5baQCfaTIcNeyXKnEQYCzCbThk8wxhelU= =jf9e -----END PGP SIGNATURE----- --GBuTPvBEOL0MYPgd-- --===============0218548906723912356== 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". --===============0218548906723912356==--