From patchwork Mon Jul 22 01:22:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 50674 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a742:0:b0:482:c625:d099 with SMTP id f2csp1750884vqm; Sun, 21 Jul 2024 18:22:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX91GsUsFaoqzTp8JY1skiT7eG7JEDaAzOd41OVH5LvysFzt6DQufk0ubn6y0vEfbkRpeZELwigtbdI7s0yLE2Xgopr3otX352AbQ== X-Google-Smtp-Source: AGHT+IHAvBMOX1acht8HexWbzEFhb7gQKHxJNEHsrs4KWpUHfGw3WZp/aNGW+1QSczxUBjH+YZ2j X-Received: by 2002:a05:6512:2209:b0:52e:9fda:f18a with SMTP id 2adb3069b0e04-52efb885868mr3548511e87.44.1721611370854; Sun, 21 Jul 2024 18:22:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721611370; cv=none; d=google.com; s=arc-20160816; b=TPnMHfLK8UqwW3JjYLUpUOXcTXRz1+/TVG1vOtZVJdHfANndUabvfDFb+skiMvHyQC Tm8YOSjYOSAR5xsaUa/bpNHwz6lhCWZtvcBTHQdVuDNWiDaZ36Olmpln5RF6yhub5GaY 2ws9Q5zEzURSLBC+90AEHIniboiVonQ7H0lPiAI4wGys/t+1Appwe4qh61L2TU4ubk7I APm6+0pxLQaLemVixelLDmxkPC1K21OkdDXx/M/6irmPcK4jeJa3GJ0kNR8KFylY0TO0 uuLKe/lWHuczQZAI27Yi2JNqT2O5b1PubdY9vK5rQ/ELFVXW7wFyTfNulPfifUR8fsEe LWNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to:from :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to :delivered-to; bh=/0fDp+CCU5QyhKjjfjfC62eF2HkuCUUUrejRvSF6+0c=; fh=nenT92/WZoU6unXd3J6UhGUdod4piddKfVtctNBOh6k=; b=RVIKyFLG5VYqcHNmqyaQDuzadNyk1n4CIlAg/gLpNiT1IZ4RYmh+20/7xwWuiLBWP9 3YAWxv//eoowFUbwRZfmdVn47i1jSBRp0/JBKDkkjlkBmjefzFBKStdQSAOLkYt2vads FRPkFScxRcxcl3y51RjyWzMBQWYkXlWlRIuiScWRHp3HJ8PlRew0zKOwXSRk1rDAuHrn 8tyUi/ENjr2UTY/JQJiWT5Kn3HBpcwPzc8sEnAJdIdvTWLtBAT6kMIzp1qS+rL1+y9xr +/X8No2Z3S9JI+a5sujINOPN4+x/ODsIf4qPZIu+cthPeaeS4AGN2OQ/hINa5gbfya0+ iHaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-52f00933044si673023e87.512.2024.07.21.18.22.50; Sun, 21 Jul 2024 18:22:50 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 35E8E68D5AA; Mon, 22 Jul 2024 04:22:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vidala.lynne.ee (vidala.pars.ee [116.203.72.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8940C68D45D for ; Mon, 22 Jul 2024 04:22:39 +0300 (EEST) To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Jul 2024 03:22:31 +0200 Message-ID: <20240722012237.819610-1-dev@lynne.ee> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] aacdec: set ac->output_elements upon channel element free 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: , X-Patchwork-Original-From: Lynne via ffmpeg-devel From: Lynne Reply-To: FFmpeg development discussions and patches Cc: Lynne Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: kKkc2D7BU0yg The issue is that ac->output_elements is populated from ac->che, which may be freed, leaving dangling pointers in this list. Should fix clusterfuzz. --- libavcodec/aac/aacdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index ea2ba84a80..c37de2e003 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -166,6 +166,7 @@ static av_cold int che_configure(AACDecContext *ac, ac->proc.sbr_ctx_close(ac->che[type][id]); } av_freep(&ac->che[type][id]); + memset(ac->output_element, 0, sizeof(ac->output_element)); } return 0; }