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 07FF643677 for ; Thu, 21 Jul 2022 06:45:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 51DBA68B590; Thu, 21 Jul 2022 09:45:11 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C3F7768ABFC for ; Thu, 21 Jul 2022 09:45:04 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 12FCF20008 for ; Thu, 21 Jul 2022 06:45:03 +0000 (UTC) Date: Thu, 21 Jul 2022 08:45:03 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220721064503.GE2088045@pb2> References: <20220719113453.23169-1-michael@niedermayer.cc> <20220719113453.23169-5-michael@niedermayer.cc> <20220720143013.GA2088045@pb2> <20220720224638.GD2088045@pb2> MIME-Version: 1.0 In-Reply-To: <20220720224638.GD2088045@pb2> Subject: Re: [FFmpeg-devel] [PATCH 5/6] avcodec/ffv1dec: consider run increase in minimal golomb frame 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="===============5952905419597014386==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5952905419597014386== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z3ND3gJe4e1E4uwh" Content-Disposition: inline --z3ND3gJe4e1E4uwh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 21, 2022 at 12:46:38AM +0200, Michael Niedermayer wrote: > On Thu, Jul 21, 2022 at 12:17:22AM +0200, Andreas Rheinhardt wrote: > > Michael Niedermayer: > > > On Tue, Jul 19, 2022 at 08:37:38AM -0300, James Almer wrote: > > >> > > >> > > >> On 7/19/2022 8:34 AM, Michael Niedermayer wrote: > > >>> Fixes: Timeout > > >>> Fixes: 49160/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1= _fuzzer-5672826144686080 > > >>> > > >>> Found-by: continuous fuzzing process https://github.com/google/oss-= fuzz/tree/master/projects/ffmpeg > > >>> Signed-off-by: Michael Niedermayer > > >>> --- > > >>> libavcodec/ffv1dec.c | 6 +++++- > > >>> 1 file changed, 5 insertions(+), 1 deletion(-) > > >>> > > >>> diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c > > >>> index 01ddcaa512..9bdac0be4e 100644 > > >>> --- a/libavcodec/ffv1dec.c > > >>> +++ b/libavcodec/ffv1dec.c > > >>> @@ -883,7 +883,11 @@ static int decode_frame(AVCodecContext *avctx,= AVFrame *rframe, > > >>> if (buf_size < avctx->width * avctx->height / (128*8)) > > >>> return AVERROR_INVALIDDATA; > > >>> } else { > > >>> - if (buf_size < avctx->height / 8) > > >>> + int i; > > >> > > >> for (int i... > > >=20 > > > will apply with that change > > >=20 > > > thx > > >=20 > >=20 > > James' suggestion made you use an uninitialized i in the actual check; >=20 > yes >=20 >=20 > > and even the original check is wrong, as one can overrun ff_log2_run > > (unless there is a check that I am not missing).=20 >=20 > Theres a check but its too late >=20 >=20 > > So it seems to me that > > reverting 15785e044ee1265464bb4f3ed727e2a8074f97b4 is appropriate. >=20 > not against that but heres a quick fix attempt >=20 >=20 > Author: Michael Niedermayer > Date: Thu Jul 21 00:20:41 2022 +0200 >=20 > avcodec/ffv1dec: Fix AC_GOLOMB_RICE min size check will apply this so the uninitialized read is fixed. If this has some off by 1 error or something that can be adjusted later dont want to leave this bug open [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No great genius has ever existed without some touch of madness. -- Aristotle --z3ND3gJe4e1E4uwh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYtj16wAKCRBhHseHBAsP q+5YAJ40A8HaGxFv6dEPk1+QKe9pfy8DvACfV+oGOcntGspxko4kRDu1nH8xVeY= =YS9d -----END PGP SIGNATURE----- --z3ND3gJe4e1E4uwh-- --===============5952905419597014386== 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". --===============5952905419597014386==--