From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 967904B82F for ; Mon, 30 Jun 2025 00:42:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C943F68DD82; Mon, 30 Jun 2025 03:42:29 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id EE9A868DD6C for ; Mon, 30 Jun 2025 03:42:27 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 058FE43196 for ; Mon, 30 Jun 2025 00:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1751244147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ayxhHEZNuQjVjtF5X7Z4aVGohWD1dHXrW8rnsBICgGY=; b=XxeMcn6oUiC+V8zLKXZXYoUdAgX10OhlyEtfjM2Sp1PY5NN9ANfMzX2u5Go1iQrX3JksHC 1I0jk9ptYBnY8nsbDzqP7YS22D9bj1Vvou2sxtViLNMuW77U0P5TISxwr67E4SmGjtSGfG 5U0bkzdX2S5L2GtnJyV+CD4GTWSFBrrUHCLPTsHI0T4AsbgUEOwusKgunM9mYLhwktjCGG urL8d4cugXebby4a+4W7JWp/zOMGaxcJCKWs3QigP07mDYn2CpbysWfrBUIFQwKSCWSjx5 SobVsbFl8g17zzwiZjyVX3aiUJ5QOiUcstV68mr8Mk7SFk61/k5NpgyiVT5Brw== Date: Mon, 30 Jun 2025 02:42:25 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250630004225.GX29660@pb2> References: <20250628002157.3665951-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddutddvlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avcodec/rv60dec: Check ofs for overflows 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="===============3840724830288334825==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3840724830288334825== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CHIYnidlvTnekcwJ" Content-Disposition: inline --CHIYnidlvTnekcwJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 29, 2025 at 09:38:50AM +1000, Peter Ross wrote: > On Sat, Jun 28, 2025 at 02:21:57AM +0200, Michael Niedermayer wrote: > > Fixes: signed integer overflow: 30 + 2147483647 cannot be represented i= n type 'int' > > Fixes: 418335931/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV60= _fuzzer-6568264620900352 > >=20 > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/rv60dec.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/rv60dec.c b/libavcodec/rv60dec.c > > index 6075598861d..4a3d9067db6 100644 > > --- a/libavcodec/rv60dec.c > > +++ b/libavcodec/rv60dec.c > > @@ -2347,10 +2347,12 @@ static int rv60_decode_frame(AVCodecContext *av= ctx, AVFrame * frame, > > ofs =3D get_bits_count(&gb) / 8; > > =20 > > for (int i =3D 0; i < s->cu_height; i++) { > > - if (header_size + ofs >=3D avpkt->size) > > + if (ofs >=3D avpkt->size - header_size) > > return AVERROR_INVALIDDATA; > > s->slice[i].data =3D avpkt->data + header_size + ofs; > > s->slice[i].data_size =3D FFMIN(s->slice[i].size, avpkt->size = - header_size - ofs); > > + if (s->slice[i].size > INT32_MAX - ofs) > > + return AVERROR_INVALIDDATA; > > ofs +=3D s->slice[i].size; > > } >=20 > please apply will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA --CHIYnidlvTnekcwJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaGHdcQAKCRBhHseHBAsP q9VMAKCa7lHaHKvmP2kyf5qSFJuq9uqajwCeICN8WtZnPlBTIdR3kZ/wPwBY8UE= =6dzi -----END PGP SIGNATURE----- --CHIYnidlvTnekcwJ-- --===============3840724830288334825== 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". --===============3840724830288334825==--