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 ED5314A29B for ; Mon, 25 Mar 2024 22:19:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4535768D0B4; Tue, 26 Mar 2024 00:19:50 +0200 (EET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 95D2968CD83 for ; Tue, 26 Mar 2024 00:19:44 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id E2F56C0002 for ; Mon, 25 Mar 2024 22:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1711405184; 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=GUhsaiAbceiJ1IU7EFGeF8sTFGhgSdaHRNvD2oi5o14=; b=Cxny9TQh4e7VxmCpHpPVj6e71yIGL1NNOguTS9JGXl+O0UP+MoZ5mffbJ7viMVvtSHZ0v4 4Nb9XUOkb7Zd/a9Ssj+lQxf3dMUVYybVRff9+GUTabfd779CFuT1mz1FRVsP6Fdb4d/yAA xW3sg0eIFKW7mAW5vzFXfGCv5D+My8KCmU73b92MBlw7Dne8cAQph6wQDZlckize0bMoWF SeGSJF7myuoEyC3WXQCBfjvAjjrGp67Q6jM+DqL/+oFZtWh5HXNprZDEMWM0Wvkcy0Q/eD ejwUjl+l9RTZGR73GL6CUgJIeILjZW4i3QM5ZaEJ48zIdp103y5+zFEduf/8HA== Date: Mon, 25 Mar 2024 23:19:43 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240325221943.GU6420@pb2> References: MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avcodec/h264_mp4toannexb: Fix heap buffer overflow 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="===============6445652848713985880==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6445652848713985880== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Wa1XggxJWgIcwEqd" Content-Disposition: inline --Wa1XggxJWgIcwEqd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 25, 2024 at 04:09:00PM +0800, Zhao Zhili wrote: > From: Zhao Zhili >=20 > Fixes: out of array write > Fixes: 64407/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_MP4TOANNEXB_f= uzzer-4966763443650560 >=20 > mp4toannexb_filter counts the number of bytes needed in the first > pass and allocate the memory, then do memcpy in the second pass. > Update sps/pps size in the loop makes the count invalid in the > case of SPS/PPS occur after IDR slice. This patch process in-band > SPS/PPS before the two pass loops. > --- > libavcodec/bsf/h264_mp4toannexb.c | 59 ++++++++++++++++++++++++------- > 1 file changed, 46 insertions(+), 13 deletions(-) I confirm this fixes the testcase this or some other fix is needed for 7.0 thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein --Wa1XggxJWgIcwEqd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZgH4fAAKCRBhHseHBAsP q7s+AJ9zlkl1kRN6SpLv3I1VTyil1wjSgwCeJAYEQsgIBQXPK4NsYyqYpTfEZb0= =7RaD -----END PGP SIGNATURE----- --Wa1XggxJWgIcwEqd-- --===============6445652848713985880== 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". --===============6445652848713985880==--