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 BAFB64DC95 for ; Sat, 3 Jan 2026 18:58:01 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'qoOWVuVZZVNeCqcQiHe4x+nBi85NAqaWvy3XsdO5vG0=', expected b'7bn+gmGXA4NiWUhfLyCx3e3SMH9pCTQAKeW8cbY0hsU=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1767466673; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=qoOWVuVZZVNeCqcQiHe4x+nBi85NAqaWvy3XsdO5vG0=; b=hQcKUeLHQ4NrIYgT08q0Nq/E7QtyP+nyPtAxKgfeEQuEa4HMsjI1bTqtZfZQqWrcHIaO9 twbColEV+m9zTM/Ko4r9OFAE85Cdpco07MY1ccX5tDGI/OnUt8AEDS9xcYqA/WBp6JJqR3x k0L4mdAqjfGLQfXluKhoL/mlyusOJmWc7u2SfEJtL3QTSZU9L5CFpT22w+3ohs9kd+nnW6Q 0YWnuGdIcV8a7Z7roRQZ8o2s0oqvWhMTpHian023g5Uzdynost1iaES92vmu+2KxrBPJdyx t64nczyoZSGSVjyJDl12921FMXc9qAh7uKsufJ+4J2123nBH3AwPWEQguQ/w== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 76620690BDC; Sat, 3 Jan 2026 20:57:53 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1767466657; b=LrlRAiURNTOC9DnXr9sl4CrGGi0iKSXLtCgNTIY0uxb5TIq+pdW2E9fbcSxyPN3e2tbDN nwoTQ7+eGazQORNyXnFNQT5AuiH3QHt04z7kpQSK3lxR2b9om4KZIDmk75zpIGxDgRO7fYe WdXEvBo1dZRCgyyl8wRHvITkIFhk4ca8qAPO0L0SsbMbO9sicLGrwl9tpQSZEH6RAkFszHw MUSWb+V0ZEHbVdvGCloZEnl6Jr14CmhcuzzMxsgiyfXe6P2mWybSXU+nFM46yeYqLWnwp7l N4sKDRq6nWUUB1+DcMowIGlIuhR8AoJlFQGP4jFPZRwKx/2vIfLjQpWzyUfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1767466657; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=ErU+b5KSGPu+M1D8yrF8ELF8thtvQz8Srtp8RIeTp+w=; b=WXDt6YAKnOIbTCU+OVC+aAwDy9ToCDJB6aMDsBAOJ8tUEaH062WdcBTJs38JtSREDPPlT ko7I0AzjBQNTvBoZC4ymWXzGo92g1295fbtSRhQokbKkndp7C4MzeUUJVZZfzaZWXPkYtMH Xr4uLwKD0XqWyi7N3It8QUcCS5zi3LOlVQ1Ydo3n/c1fSW4pON0YSWJAyqoiJmzyrmDSiTj opopyepNR/Iw3JsgK5jQ+s2CBT+okEgri4twn6pONJ5KApAw7STQPEhAtKkQsZB3JTBtYM4 YAJmSmm9JLw8RnbaZWgLf65/KPLFIvcabrPfNuuF2+skWtR/WsidWzA0AxTw== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1767466649; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=7bn+gmGXA4NiWUhfLyCx3e3SMH9pCTQAKeW8cbY0hsU=; b=MLxeqMVRj2sjmAZ2FL1T92EwfkXteVFdw9S7d/1PUmKTtVZbRDhgn+z4HMQFYNC4wPfSs /QZVRyWduCKy7V6UVxQE3cJDgfxVjRw1yPLnQVKez3P0/ZsVf52gl89bg6uyDkXTlEgeRuR NSD7CrGVUCbs+HIkMwiaBfledFJ+RTFZhHbPU6UL4NYQA4o+I67QS1G6tvDhfwUHfFO97Gt f3446hkqtt8FrpJShkoSCjpMzM1tUXMFJl6tuNhMF6CaXos0eh6wfNtBdtfeAWVIG6sK5Zx euHIVnKkbttCUhagiCmccUjTLkjk5cu3/W3VcJfXKc6wBva2szmy6jnv/Exw== Received: from de3a2b3407a2 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id C12836903AD for ; Sat, 3 Jan 2026 20:57:29 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Sat, 03 Jan 2026 18:57:29 -0000 Message-ID: <176746664994.25.15448467039894021663@4457048688e7> Message-ID-Hash: MC2LD3XBZGZVY2P5PFJK3M7PCLQBMXER X-Message-ID-Hash: MC2LD3XBZGZVY2P5PFJK3M7PCLQBMXER X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PR] avcodec/notchlc: zero-initialize history buffer (PR #21367) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Timo Rothenpieler via ffmpeg-devel Cc: Timo Rothenpieler Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21367 opened by Timo Rothenpieler (BtbN) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21367 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21367.patch Otherwise a specially crafted bitstream can potentially read uninitialized stack memory. Fixes #YWH-PGM40646-37 >>From 36df0c5311558b5b79299a089b65aab167140a9c Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler Date: Sat, 3 Jan 2026 19:15:39 +0100 Subject: [PATCH 1/2] avcodec/notchlc: actually use HISTORY_SIZE to initialize history --- libavcodec/notchlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/notchlc.c b/libavcodec/notchlc.c index d99de1810e..82c48d2054 100644 --- a/libavcodec/notchlc.c +++ b/libavcodec/notchlc.c @@ -79,7 +79,7 @@ static int lz4_decompress(AVCodecContext *avctx, PutByteContext *pb) { unsigned reference_pos, delta, pos = 0; - uint8_t history[64 * 1024]; + uint8_t history[HISTORY_SIZE]; int match_length; while (bytestream2_get_bytes_left(gb) > 0) { -- 2.49.1 >>From 1829e4f171b5ac897ae2731f0a3a0ace4d5834dc Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler Date: Sat, 3 Jan 2026 19:55:56 +0100 Subject: [PATCH 2/2] avcodec/notchlc: zero-initialize history buffer Otherwise a specially crafted bitstream can potentially read uninitialized stack memory. Fixes #YWH-PGM40646-37 --- libavcodec/notchlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/notchlc.c b/libavcodec/notchlc.c index 82c48d2054..c28fddcea0 100644 --- a/libavcodec/notchlc.c +++ b/libavcodec/notchlc.c @@ -79,7 +79,7 @@ static int lz4_decompress(AVCodecContext *avctx, PutByteContext *pb) { unsigned reference_pos, delta, pos = 0; - uint8_t history[HISTORY_SIZE]; + uint8_t history[HISTORY_SIZE] = { 0 }; int match_length; while (bytestream2_get_bytes_left(gb) > 0) { -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org