get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2217463/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2217463,
    "url": "http://patchwork.ozlabs.org/api/patches/2217463/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260329134016.30245-1-fw@strlen.de/",
    "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": "<20260329134016.30245-1-fw@strlen.de>",
    "list_archive_url": null,
    "date": "2026-03-29T13:40:13",
    "name": "[nf] netfilter: x_tables: ensure names are nul-terminated",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "da13fef4536193e28f7639a548e7c335a9c619c0",
    "submitter": {
        "id": 1025,
        "url": "http://patchwork.ozlabs.org/api/people/1025/?format=api",
        "name": "Florian Westphal",
        "email": "fw@strlen.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260329134016.30245-1-fw@strlen.de/mbox/",
    "series": [
        {
            "id": 497918,
            "url": "http://patchwork.ozlabs.org/api/series/497918/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=497918",
            "date": "2026-03-29T13:40:13",
            "name": "[nf] netfilter: x_tables: ensure names are nul-terminated",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497918/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217463/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217463/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-11482-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 spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11482-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=91.216.245.30",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=strlen.de",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fkFrK5gMdz1y1P\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 30 Mar 2026 00:40:33 +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 5D475300EA91\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 29 Mar 2026 13:40:27 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 93DF136F43A;\n\tSun, 29 Mar 2026 13:40:26 +0000 (UTC)",
            "from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc\n [91.216.245.30])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A814F9C0\n\tfor <netfilter-devel@vger.kernel.org>; Sun, 29 Mar 2026 13:40:24 +0000 (UTC)",
            "by Chamillionaire.breakpoint.cc (Postfix, from userid 1003)\n\tid 1387360A55; Sun, 29 Mar 2026 15:40:22 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774791626; cv=none;\n b=HsjFICdiYkccCAv71ZC5R+0e6jkClqd6xXtuV/ExBXXR0GfjoHSQUkQhX2my6tWjI8voq7QRHPEMEWqqKaWvkrcn0efqfZQR5h7nHEnY2UCe7Bb++bpH8cMQzWNk8mM01e4SZ9dzGKEvIFbjVht0jw0iku4j0cWkcCI/bki+mrE=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774791626; c=relaxed/simple;\n\tbh=meFUZnXTDxDLeeObQlwRDieff/kiqR5Yzytc/25OMAM=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=EaJvrXpM7fP0wVTPe6MFq+axxWgz947Eep32l8Yimxe3tVxyuHQdQWG3NBpot7Ilj+28Dqgt5Alcc8ZZJU6WlBM2t2l8NoPLMsO23YcuCSQQdZCkRKqpIKmfFE8feGF4IxGW2GmkurSRQFoq+xh36h+m4UmhDZG6yFm72DLtoHs=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=strlen.de;\n spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc;\n arc=none smtp.client-ip=91.216.245.30",
        "From": "Florian Westphal <fw@strlen.de>",
        "To": "<netfilter-devel@vger.kernel.org>",
        "Cc": "Florian Westphal <fw@strlen.de>",
        "Subject": "[PATCH nf] netfilter: x_tables: ensure names are nul-terminated",
        "Date": "Sun, 29 Mar 2026 15:40:13 +0200",
        "Message-ID": "<20260329134016.30245-1-fw@strlen.de>",
        "X-Mailer": "git-send-email 2.53.0",
        "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": "Reject names that lack a \\0 character before feeding them\nto functions that expect c-strings.\n\nFixes tag is the most recent commit that needs this change.\n\nFixes: c38c4597e4bf (\"netfilter: implement xt_cgroup cgroup2 path match\")\nSigned-off-by: Florian Westphal <fw@strlen.de>\n---\n net/netfilter/xt_cgroup.c  |  6 ++++++\n net/netfilter/xt_physdev.c | 10 ++++++++++\n net/netfilter/xt_rateest.c |  5 +++++\n 3 files changed, 21 insertions(+)",
    "diff": "diff --git a/net/netfilter/xt_cgroup.c b/net/netfilter/xt_cgroup.c\nindex c437fbd59ec1..43d2ae2be628 100644\n--- a/net/netfilter/xt_cgroup.c\n+++ b/net/netfilter/xt_cgroup.c\n@@ -65,6 +65,9 @@ static int cgroup_mt_check_v1(const struct xt_mtchk_param *par)\n \n \tinfo->priv = NULL;\n \tif (info->has_path) {\n+\t\tif (strnlen(info->path, sizeof(info->path)) >= sizeof(info->path))\n+\t\t\treturn -ENAMETOOLONG;\n+\n \t\tcgrp = cgroup_get_from_path(info->path);\n \t\tif (IS_ERR(cgrp)) {\n \t\t\tpr_info_ratelimited(\"invalid path, errno=%ld\\n\",\n@@ -102,6 +105,9 @@ static int cgroup_mt_check_v2(const struct xt_mtchk_param *par)\n \n \tinfo->priv = NULL;\n \tif (info->has_path) {\n+\t\tif (strnlen(info->path, sizeof(info->path)) >= sizeof(info->path))\n+\t\t\treturn -ENAMETOOLONG;\n+\n \t\tcgrp = cgroup_get_from_path(info->path);\n \t\tif (IS_ERR(cgrp)) {\n \t\t\tpr_info_ratelimited(\"invalid path, errno=%ld\\n\",\ndiff --git a/net/netfilter/xt_physdev.c b/net/netfilter/xt_physdev.c\nindex 343e65f377d4..1b522a181a8d 100644\n--- a/net/netfilter/xt_physdev.c\n+++ b/net/netfilter/xt_physdev.c\n@@ -107,6 +107,16 @@ static int physdev_mt_check(const struct xt_mtchk_param *par)\n \t\treturn -EINVAL;\n \t}\n \n+#define X(memb) strnlen(info->memb , sizeof(info->memb)) >= sizeof(info->memb)\n+\tif (X(physindev))\n+\t\treturn -ENAMETOOLONG;\n+\tif (X(physoutdev))\n+\t\treturn -ENAMETOOLONG;\n+\tif (X(in_mask))\n+\t\treturn -ENAMETOOLONG;\n+\tif (X(out_mask))\n+\t\treturn -ENAMETOOLONG;\n+#undef X\n \tif (!brnf_probed) {\n \t\tbrnf_probed = true;\n \t\trequest_module(\"br_netfilter\");\ndiff --git a/net/netfilter/xt_rateest.c b/net/netfilter/xt_rateest.c\nindex 72324bd976af..b1d736c15fcb 100644\n--- a/net/netfilter/xt_rateest.c\n+++ b/net/netfilter/xt_rateest.c\n@@ -91,6 +91,11 @@ static int xt_rateest_mt_checkentry(const struct xt_mtchk_param *par)\n \t\tgoto err1;\n \t}\n \n+\tif (strnlen(info->name1, sizeof(info->name1)) >= sizeof(info->name1))\n+\t\treturn -ENAMETOOLONG;\n+\tif (strnlen(info->name2, sizeof(info->name2)) >= sizeof(info->name2))\n+\t\treturn -ENAMETOOLONG;\n+\n \tret  = -ENOENT;\n \test1 = xt_rateest_lookup(par->net, info->name1);\n \tif (!est1)\n",
    "prefixes": [
        "nf"
    ]
}