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 9F6D544218 for ; Fri, 2 Sep 2022 09:02:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1995068B9F0; Fri, 2 Sep 2022 12:02:39 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 12A1068B7AB for ; Fri, 2 Sep 2022 12:02:31 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 1B18A1BF20B for ; Fri, 2 Sep 2022 09:02:30 +0000 (UTC) Date: Fri, 2 Sep 2022 11:02:29 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220902090229.GR2088045@pb2> References: <20220818223535.13078-1-michael@niedermayer.cc> <20220818223535.13078-4-michael@niedermayer.cc> <20220821142309.GI2088045@pb2> <20220828173953.GB2088045@pb2> MIME-Version: 1.0 In-Reply-To: <20220828173953.GB2088045@pb2> Subject: Re: [FFmpeg-devel] [PATCH 4/4] avcodec/speedhq: Check width 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="===============2167685258524707210==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2167685258524707210== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="g7KorqjRHmzOu6H+" Content-Disposition: inline --g7KorqjRHmzOu6H+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 28, 2022 at 07:39:53PM +0200, Michael Niedermayer wrote: > On Sun, Aug 21, 2022 at 04:23:09PM +0200, Michael Niedermayer wrote: > > On Sun, Aug 21, 2022 at 12:54:57PM +0200, Paul B Mahol wrote: > > > On Fri, Aug 19, 2022 at 12:36 AM Michael Niedermayer > > > wrote: > > >=20 > > > > Fixes: out of array access > > > > Fixes: > > > > 50014/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEDHQ_fuz= zer-4748914632294400 > > > > > > > > Alternatively the buffer size can be increased > > > > > > > > Found-by: continuous fuzzing process > > > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > > > Signed-off-by > > > > : > > > > Michael Niedermayer > > > > --- > > > > libavcodec/speedhq.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c > > > > index c43de4f199..ffee5f973b 100644 > > > > --- a/libavcodec/speedhq.c > > > > +++ b/libavcodec/speedhq.c > > > > @@ -499,7 +499,7 @@ static int speedhq_decode_frame(AVCodecContext = *avctx, > > > > AVFrame *frame, > > > > uint32_t second_field_offset; > > > > int ret; > > > > > > > > - if (buf_size < 4 || avctx->width < 8) > > > > + if (buf_size < 4 || avctx->width < 8 || avctx->width % 8 !=3D = 0) > > > > return AVERROR_INVALIDDATA; > > > > > > >=20 > > > Is this right thing to do? > >=20 > > We can increase the buffer size or change how the %8 !=3D 0 case is han= dled > > WIthout a non fuzzed file with such dimensions, I do not know what the > > correct handling of such a file is. >=20 > > What do you prefer to be done ? >=20 > ping i will apply this in the next 24h thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Whats the most studid thing your enemy could do ? Blow himself up Whats the most studid thing you could do ? Give up your rights and freedom because your enemy blew himself up. --g7KorqjRHmzOu6H+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYxHGoQAKCRBhHseHBAsP q3nMAJ9VYoniNsxoRzF72sI4XgbBJwDDWQCeOG7K+vh9cDdAwE7lqVmdQdPHqyI= =HCWJ -----END PGP SIGNATURE----- --g7KorqjRHmzOu6H+-- --===============2167685258524707210== 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". --===============2167685258524707210==--