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 4468443F0C for ; Sat, 17 Sep 2022 23:12:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4794A68BA3B; Sun, 18 Sep 2022 02:12:08 +0300 (EEST) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D782768B6D3 for ; Sun, 18 Sep 2022 02:12:00 +0300 (EEST) Received: from 15fc8db07f19f8c510f57cfd648a18df ([1.136.235.37]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id 28HNBp5r005731 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Sat, 17 Sep 2022 23:11:55 GMT Date: Sun, 18 Sep 2022 09:11:47 +1000 From: Peter Ross To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches References: <20220917211557.11547-1-michael@niedermayer.cc> <20220917211557.11547-8-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: <20220917211557.11547-8-michael@niedermayer.cc> Subject: Re: [FFmpeg-devel] [PATCH 8/9] avformat/icodec: Check nb_pal 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="===============6010856613615207916==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6010856613615207916== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fp+9vDM+bx5M2cvW" Content-Disposition: inline --fp+9vDM+bx5M2cvW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 17, 2022 at 11:15:56PM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: 538976288 * 4 cannot be represented in ty= pe 'int' > Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_ICO_fuzzer-6690068= 904935424 >=20 > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/t= ree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavformat/icodec.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/libavformat/icodec.c b/libavformat/icodec.c > index 290f658d0c0..85dab3bca0a 100644 > --- a/libavformat/icodec.c > +++ b/libavformat/icodec.c > @@ -196,6 +196,9 @@ static int read_packet(AVFormatContext *s, AVPacket *= pkt) > AV_WL32(buf + 32, image->nb_pal); > } > =20 > + if (image->nb_pal > INT_MAX / 4 - 14 - 40) > + return AVERROR_INVALIDDATA; > + > AV_WL32(buf - 4, 14 + 40 + image->nb_pal * 4); > AV_WL32(buf + 8, AV_RL32(buf + 8) / 2); > } > --=20 > 2.17.1 lgtm, please apply -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --fp+9vDM+bx5M2cvW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCYyZULwAKCRBnYHnFrEDd a07HAJ96YqVKzCmAi3bz2R/QapI8hfzwwQCfVbJnSbNQd1+XWFJa+4N0OyhazWE= =8td+ -----END PGP SIGNATURE----- --fp+9vDM+bx5M2cvW-- --===============6010856613615207916== 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". --===============6010856613615207916==--