From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5281438008 for ; Mon, 13 Jul 2026 13:58:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783951117; cv=none; b=TE9kLp4tA+UU4J01IfQoALFXyPameXdzXhzBovK9eoHm1JYurNoOR6IvSKQcWyG4IAAl+IUc63VbpV3ahLF4hLWSviqYc50FyxK/tAVRYuSraIqrsyKxdwCDpvloxEjEyBaDO5mtvA7C0K5jD9SQrUHe/Es5sTpYlDo7PzEIF2g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783951117; c=relaxed/simple; bh=pL7llEDlb0bKgKN+CfHDZY9yJudhGUtrFBicZcMzmss=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=oooRkwZYEyY2Vbih2iqeOFh8O1rqOx+Gtxy96N+FfV5F1qULG1vaxq7aIXCg1M2aF2/n0tnYMiqGPjXP3CrjMFT1pGwF3J7+ZL1ukzB3WSdoFryWhzA85Kkakx+O6EEppnjO/vOK0Unh7ECjn3y9FEsVx9IPZ4SKUL6ftay2RB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tIAO+LjM; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tIAO+LjM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8C9E1F000E9; Mon, 13 Jul 2026 13:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1783951115; bh=jKcUjaB3Z0QjCWNC7nWpzp8VwJhsLC6+92cMCUY/d7g=; h=Subject:To:Cc:From:Date; b=tIAO+LjMMafeK51XQnW7brD6REiTVEaucg+TRRzjq5hTxIyoT42JKq+J+NqUqnuYi YlNk3lF6jVNYYPBlmc79WNr7wUzaZV2pO1AzJCyZnzBig0qSxx92e5C1Hn1txc5BY/ duMSefok6EC2cAXSF2HazlrOEn8d0iz3JoE2RVz8= Subject: FAILED: patch "[PATCH] netfilter: ebtables: zero chainstack array" failed to apply to 6.12-stable tree To: fw@strlen.de Cc: From: Date: Mon, 13 Jul 2026 15:48:34 +0200 Message-ID: <2026071334-dribble-bunny-03b1@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x cbfe53599eebffd188938ab6774cc41794f6f9d5 # git commit -s git send-email --to '' --in-reply-to '2026071334-dribble-bunny-03b1@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From cbfe53599eebffd188938ab6774cc41794f6f9d5 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sat, 4 Jul 2026 10:23:31 +0200 Subject: [PATCH] netfilter: ebtables: zero chainstack array sashiko reports: looking at ebtables table translation, could a sparse cpu_possible_mask lead to an uninitialized pointer free? If cpu_possible_mask is sparse (for example, CPU 0 and CPU 2 are possible, but CPU 1 is not), the allocation loop skips CPU 1. If vmalloc_node() fails at CPU 2, the cleanup loop will blindly decrement and call vfree() on newinfo->chainstack[1]. Not a real-world bug, such allocation isn't expected to fail in the first place. Cc: stable@vger.kernel.org Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Florian Westphal diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 5b74ff827493..48187598cdd0 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c @@ -921,8 +921,7 @@ static int translate_table(struct net *net, const char *name, * if an error occurs */ newinfo->chainstack = - vmalloc_array(nr_cpu_ids, - sizeof(*(newinfo->chainstack))); + vcalloc(nr_cpu_ids, sizeof(*(newinfo->chainstack))); if (!newinfo->chainstack) return -ENOMEM; for_each_possible_cpu(i) {