Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217960/?format=api
{ "id": 2217960, "url": "http://patchwork.ozlabs.org/api/patches/2217960/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260331061434.84238-1-tpluszz77@gmail.com/", "project": { "id": 26, "url": "http://patchwork.ozlabs.org/api/projects/26/?format=api", "name": "Netfilter Development", "link_name": "netfilter-devel", "list_id": "netfilter-devel.vger.kernel.org", "list_email": "netfilter-devel@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260331061434.84238-1-tpluszz77@gmail.com>", "list_archive_url": null, "date": "2026-03-31T06:14:33", "name": "[v2] netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8cc97d43fdf3c33ec9678aebd935d772c2d7c2a8", "submitter": { "id": 93002, "url": "http://patchwork.ozlabs.org/api/people/93002/?format=api", "name": "Qi Tang", "email": "tpluszz77@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260331061434.84238-1-tpluszz77@gmail.com/mbox/", "series": [ { "id": 498126, "url": "http://patchwork.ozlabs.org/api/series/498126/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=498126", "date": "2026-03-31T06:14:33", "name": "[v2] netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/498126/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217960/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217960/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <netfilter-devel+bounces-11509-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "netfilter-devel@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=N28C7yGI;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11509-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"N28C7yGI\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.173", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flHtc6FyJz1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 17:16:08 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 5CB3A3032F50\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 06:14:46 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B2E89385519;\n\tTue, 31 Mar 2026 06:14:45 +0000 (UTC)", "from mail-pf1-f173.google.com (mail-pf1-f173.google.com\n [209.85.210.173])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 24C6B37EFED\n\tfor <netfilter-devel@vger.kernel.org>; Tue, 31 Mar 2026 06:14:43 +0000 (UTC)", "by mail-pf1-f173.google.com with SMTP id\n d2e1a72fcca58-829ac4670c4so3849576b3a.0\n for <netfilter-devel@vger.kernel.org>;\n Mon, 30 Mar 2026 23:14:43 -0700 (PDT)", "from localhost.localdomain ([47.236.127.140])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82ca8498779sm8984835b3a.25.2026.03.30.23.14.39\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 30 Mar 2026 23:14:42 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774937685; cv=none;\n b=QTubEtCl4EI6wM6rDwGPY8Ws80smMwU19c/pkVzbjzvgiIPh1ZuI5731R06h0UKiahcQMX+ABWjT43QvLG+pa3/r9m9rvVnjv/c2wq7IQ41/eWjbEHohJWVHv1gQy8PO/QuQ5iuj/FmJKPoTnzA8U74sfCClAe+iyybxrsKH888=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774937685; c=relaxed/simple;\n\tbh=+MVwa06bQ80jTsJAxdYTPPItAkzHNOIIwQDDMrjTfLk=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=BxszdQXVdF3cFpkTHpPc2mLl7UlCRAC1cOYmP9Aqt1ibvLMWeHxT7lSyQ/bJyIirXWTy7Cxyp6ux9SiD1Q2aWiDoN/dKT1NO09HvnQUR8KEYadndpP71UHAOj70XG26Y3p9xXkrLttDk20/x1BMPEZM+MeQ/xYgLDbPualv4G3o=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=N28C7yGI; arc=none smtp.client-ip=209.85.210.173", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774937683; x=1775542483;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=bkzyJ4oLOwweestkp4e2+gtljA8YSDiok5IOKRVAFxc=;\n b=N28C7yGIHxXtTsQUQvJnagExwZq9OdR3fGxH2aynR9nmtIINYAuBrw4tR1dNIxM4u6\n M17p/Nyq9ZyieWueXt9XNZQCnx3cwJ3xSY32FoCyYpNeda24tr1EPBV0BRs2F0yx47ni\n Xlw4x/BoQSaTeap3QXPbWjJVDChh9sP5rnpO7DY6y7Qdtqs/1GkJC+oon1ibtdvGiEqD\n mc2L9uqNysR3t9ZZaMxLVG7d9iW3w5la/TS53m7h6Da+UnInNeLc/wSB/d6l+7QrnuTe\n WWk2SkAAbLcgOQqhZbw1+GlntZ1QYn6FFzPWeg2uTJSUVBClum3nzgj7XP4JnyuAkMjH\n 2ggA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774937683; x=1775542483;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=bkzyJ4oLOwweestkp4e2+gtljA8YSDiok5IOKRVAFxc=;\n b=ltusqa23C8XfwvkxKuRAH5nl1SW1lMzdq1wTPt9+ujF8QIL93Uxm+ExRb35m2vqKRW\n W+egv72HAcnSjaI9V+IxY/Ei/X/t8uBS95UdaFA8IajqQAKjXXx5QyKPOAs8cT4knIYV\n saFK2gbtS9vwPj7GOZ1CG4wulw8zhdPm30lO/4dCxNFtg4pse5kqz1Vs9iqeG+YOITMm\n HMiTxxdnto5uanl7LStiqvZxT26I+DRSZYHiecclp9tVsv845yIzNh+/tkbd5LQ2pacY\n 5FX1q6dvwnk5TtX5NxMp0Q+8fBIsvfTVsc6UvOzVjZI9iQh+CxgTfgO17GoFsPlNFUHZ\n wCvg==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCUDbhoALZaepPwJUdit63OjirUFh7CDj8ZspkUyUxfR0StOkihxWR1mXPS35GxsdquKOp0ZcR81mcK5Ss8dvjo=@vger.kernel.org", "X-Gm-Message-State": "AOJu0YzLXSB8Emzxi7i03oyPZ6oipEDS+T2UmqaGO+Or2+JoHWcP0s6P\n\tH48en7NVj8WB0y8adZ7Wk5PjZth2TwItpWJZQ9WEN48O+4zTX1Lppbgj", "X-Gm-Gg": "ATEYQzx0sJU6W19I9YTlnep+JtMTxKVjS1qd/W3lZJEWRzejUC0apjNbZ4YjvY+KQG2\n\t8JIzwZgNM6gmOZQGZtUSmcZs7FjB3AdRBGCsVzugxDLd1+FNHVY8UJQKYQL0UQ7k4Uy3TOTGHnE\n\ttJipzmAw1K0UIy2hTa7wJFiVug5DHxCP7lUa1HkgAkeSSIVF1jaB5LxxzWtA1ZFPA4h/sIUDMnT\n\t2U7420RinoO4C/f+e3C8T50hGNRnx+uUOBuGUSMxGCpfluGPQTQUVQ7tzbkccx8kfaVBWiiLbFi\n\tY5Dh7xOgcB02QD05yYFmWttVe9Ht0ZX7PYvLcMU1vyU1CI3zNXFWxddNhI0hPHagtTiyyLEG9Bp\n\ts16J79CYLezGlRJiRr2XaYqVH/HljCK0UeL3UVYiMee6QPIXjV+noaAfm/sjVq37+vfOzI42GFf\n\t9iCHc4oy+CLoehZdJIy+mVKZdY3oVEp8KKJ+YBmOm/5TA2gg==", "X-Received": "by 2002:a05:6a00:2d0c:b0:829:9c5d:4342 with SMTP id\n d2e1a72fcca58-82c96024f3dmr15124148b3a.54.1774937683377;\n Mon, 30 Mar 2026 23:14:43 -0700 (PDT)", "From": "Qi Tang <tpluszz77@gmail.com>", "To": "Pablo Neira Ayuso <pablo@netfilter.org>,\n\tFlorian Westphal <fw@strlen.de>", "Cc": "Phil Sutter <phil@nwl.cc>,\n\tnetfilter-devel@vger.kernel.org,\n\tcoreteam@netfilter.org,\n\tnetdev@vger.kernel.org,\n\tkernel test robot <lkp@intel.com>,\n\tQi Tang <tpluszz77@gmail.com>", "Subject": "[PATCH v2] netfilter: ctnetlink: zero expect NAT fields when\n CTA_EXPECT_NAT absent", "Date": "Tue, 31 Mar 2026 14:14:33 +0800", "Message-ID": "<20260331061434.84238-1-tpluszz77@gmail.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260329165217.241038-1-tpluszz77@gmail.com>", "References": "<20260329165217.241038-1-tpluszz77@gmail.com>", "Precedence": "bulk", "X-Mailing-List": "netfilter-devel@vger.kernel.org", "List-Id": "<netfilter-devel.vger.kernel.org>", "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "ctnetlink_alloc_expect() allocates expectations from a non-zeroing\nslab cache via nf_ct_expect_alloc(). When CTA_EXPECT_NAT is not\npresent in the netlink message, saved_addr and saved_proto are\nnever initialized. Stale data from a previous slab occupant can\nthen be dumped to userspace by ctnetlink_exp_dump_expect(), which\nchecks these fields to decide whether to emit CTA_EXPECT_NAT.\n\nThe safe sibling nf_ct_expect_init(), used by the packet path,\nexplicitly zeroes these fields.\n\nZero saved_addr, saved_proto and dir in the else branch, guarded\nby IS_ENABLED(CONFIG_NF_NAT) since these fields only exist when\nNAT is enabled.\n\nConfirmed by priming the expect slab with NAT-bearing expectations,\nfreeing them, creating a new expectation without CTA_EXPECT_NAT,\nand observing that the ctnetlink dump emits a spurious\nCTA_EXPECT_NAT containing stale data from the prior allocation.\n\nFixes: 076a0ca02644 (\"netfilter: ctnetlink: add NAT support for expectations\")\nReported-by: kernel test robot <lkp@intel.com>\nCloses: https://lore.kernel.org/oe-kbuild-all/202603310541.XVM8V7WG-lkp@intel.com/\nSigned-off-by: Qi Tang <tpluszz77@gmail.com>\n---\n\nChanges in v2:\n - Wrap zeroing in #if IS_ENABLED(CONFIG_NF_NAT) to fix build\n when CONFIG_NF_NAT is disabled (kernel test robot)\n\nLink: https://lore.kernel.org/all/20260329165217.241038-1-tpluszz77@gmail.com/\n net/netfilter/nf_conntrack_netlink.c | 6 ++++++\n 1 file changed, 6 insertions(+)", "diff": "diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c\nindex c57c665363e0..6d7eab7e8cf8 100644\n--- a/net/netfilter/nf_conntrack_netlink.c\n+++ b/net/netfilter/nf_conntrack_netlink.c\n@@ -3593,6 +3593,12 @@ ctnetlink_alloc_expect(const struct nlattr * const cda[], struct nf_conn *ct,\n \t\t\t\t\t\t exp, nf_ct_l3num(ct));\n \t\tif (err < 0)\n \t\t\tgoto err_out;\n+#if IS_ENABLED(CONFIG_NF_NAT)\n+\t} else {\n+\t\tmemset(&exp->saved_addr, 0, sizeof(exp->saved_addr));\n+\t\tmemset(&exp->saved_proto, 0, sizeof(exp->saved_proto));\n+\t\texp->dir = 0;\n+#endif\n \t}\n \treturn exp;\n err_out:\n", "prefixes": [ "v2" ] }