From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 434C24218A4; Tue, 31 Mar 2026 16:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774975829; cv=none; b=UXCx13RvGYzAudEy9w9rjK8sZrUUSrZql8J3VZsWQgosrYI3j8M5x2W+U3Kgr7lkWMYSDlzVNXXxOUeblPW/8pnkJ3CU83ybcu3zLj53FHqRxyS4PgYql/yV03r3dF5mw1tRpW8p1DStpHABv5Lb8RPFz/YYRQYXNVVyqpi7mAA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774975829; c=relaxed/simple; bh=Tj1tgYn0H7MwDtxpkp1UnA82I3V9jzQ87AcScQTszow=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PFSqtk5pzZnPS9PqKRnDHi5QNttvOgh/3LNDzhtjK1YGxJqiH6JpD+56aq+yPW8j+xHbyuMjhDjzpnsoMXgrWFHZoT1CpDGk+uYEfJTILI2n2vnajxOBx9x88mI9+tXBYEhPsi4Wht/oPSybZ706Q8T3PqZx7mg00KfT+50JDLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=m6cCVwqY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="m6cCVwqY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CECB3C19424; Tue, 31 Mar 2026 16:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774975829; bh=Tj1tgYn0H7MwDtxpkp1UnA82I3V9jzQ87AcScQTszow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m6cCVwqYtoyNnCTiGhJOUVP2wBXtXLS/R5RI/opxmf5funODTkL+DHf6yOHhgoY4G q0LGtkojabVNwvB1eztQJEqmTxEnkTj2xqbbmaVfgfMFI5oASl4AbLQ9s7jwCakzZT k+XCpUr2sKK9XtVAGy3MnfDX+JRezjnEQmGeKGTw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Westphal , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 6.12 101/244] netfilter: nf_conntrack_expect: skip expectations in other netns via proc Date: Tue, 31 Mar 2026 18:20:51 +0200 Message-ID: <20260331161745.404560462@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260331161741.651718120@linuxfoundation.org> References: <20260331161741.651718120@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pablo Neira Ayuso [ Upstream commit 3db5647984de03d9cae0dcddb509b058351f0ee4 ] Skip expectations that do not reside in this netns. Similar to e77e6ff502ea ("netfilter: conntrack: do not dump other netns's conntrack entries via proc"). Fixes: 9b03f38d0487 ("netfilter: netns nf_conntrack: per-netns expectations") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/nf_conntrack_expect.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index 21fa550966f07..afbf3c5100f76 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c @@ -627,11 +627,15 @@ static int exp_seq_show(struct seq_file *s, void *v) { struct nf_conntrack_expect *expect; struct nf_conntrack_helper *helper; + struct net *net = seq_file_net(s); struct hlist_node *n = v; char *delim = ""; expect = hlist_entry(n, struct nf_conntrack_expect, hnode); + if (!net_eq(nf_ct_exp_net(expect), net)) + return 0; + if (expect->timeout.function) seq_printf(s, "%ld ", timer_pending(&expect->timeout) ? (long)(expect->timeout.expires - jiffies)/HZ : 0); -- 2.51.0