get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231388,
    "url": "http://patchwork.ozlabs.org/api/patches/2231388/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260430161515.3449513-3-rc@rexion.ai/",
    "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": "<20260430161515.3449513-3-rc@rexion.ai>",
    "list_archive_url": null,
    "date": "2026-04-30T16:15:15",
    "name": "[net-next,2/2] netfilter: nf_conntrack_amanda: reject port values above 65535",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "9ed390e91b5cee8815060e5c94b22facfa32e378",
    "submitter": {
        "id": 93293,
        "url": "http://patchwork.ozlabs.org/api/people/93293/?format=api",
        "name": "HACKE-RC",
        "email": "rc@rexion.ai"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260430161515.3449513-3-rc@rexion.ai/mbox/",
    "series": [
        {
            "id": 502338,
            "url": "http://patchwork.ozlabs.org/api/series/502338/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=502338",
            "date": "2026-04-30T16:12:29",
            "name": "netfilter: conntrack: validate parsed port values in IRC and Amanda helpers",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502338/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231388/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231388/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-12347-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=fail reason=\"key not found in DNS\" header.d=rexion.ai\n header.i=@rexion.ai header.a=rsa-sha256 header.s=spacemail header.b=VfGdbiLp;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-12347-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=fail reason=\"key not found in DNS\" (0-bit key) header.d=rexion.ai\n header.i=@rexion.ai header.b=\"VfGdbiLp\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=66.29.159.77",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=rexion.ai",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=rexion.ai"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4g603T142Vz1yJr\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 02:28:37 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 30B3B307363D\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 16:25:42 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 047E147AF6B;\n\tThu, 30 Apr 2026 16:25:06 +0000 (UTC)",
            "from out-06.smtp.spacemail.com (out-06.smtp.spacemail.com\n [66.29.159.77])\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 03B514779B3;\n\tThu, 30 Apr 2026 16:25:00 +0000 (UTC)",
            "from Kyren (unknown [49.207.224.37])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby mail.spacemail.com (Postfix) with ESMTPSA id 4g5zmB4Btkz2x9M;\n\tThu, 30 Apr 2026 16:15:22 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777566304; cv=none;\n b=sW92QhkuVPSp40b9pvEVEg1zHWEv+I5J7ham2Dt54/E2nFi3ZwfTBB1weBNvobg7sDi4uFRcxNYsOto63X9Sx1NoZtV1h/cLAYkV8cUhfiGm9YY1WrbnmB3Xe/i5HMywqVZi4k3wLfDSVbth/ZTkijSR84BtKT3qDol6WMPpBwg=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777566304; c=relaxed/simple;\n\tbh=kQ68Jqk7qwS4xb2XXtxn7/6Xq/is6YQE2sjqSQ38KGg=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=StiRV8hE0xIJ4CQUGk3IQOrmG0sI3fNZg7Jfe2HBMSZiB50JCodv2G5d31QFwxnYz8hs/lOMxRkAMQIGbjARxEYIiYYH00scu3Tg4hN5AgXSWmo5RWsOK+5aYGbv7Ls5/nx0JYAmG9mM2xq4kvKra10s0txzlxM30euLx/vzxz8=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=rexion.ai;\n spf=pass smtp.mailfrom=rexion.ai;\n dkim=fail (0-bit key) header.d=rexion.ai header.i=@rexion.ai\n header.b=VfGdbiLp reason=\"key not found in DNS\";\n arc=none smtp.client-ip=66.29.159.77",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=rexion.ai;\n\ts=spacemail; t=1777565726;\n\tbh=sRUwxv105zLC4orUk+g7f3wF3S6imYFW5vkon8InWC4=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=VfGdbiLpZF3/pFWCEPGshc7+bPnYyCD0Z4KKMjd0NaAALnW/S/R47sIRlmFKaobIV\n\t FQ53fNtE7oFjc4NE5eQOSGW2e+/x1X9QJHvgVCouVJNwuXnD9IxT4NNtqDncHT45N/\n\t mfaF2J5nkp9Ktn1OPrSDXzAuSb3ZwFH0k91Ra9a+8OPhW4vL8e35LAyS1zarrcIKHW\n\t FDOUHl7/ADHTJKEVNB0S1o1mCFaTk2SyzoH3Fv0G5LcCV/oufal/Ot/Z3CN2FiVxKg\n\t dnxML5+0mLX71HTH+xDLJVJgzlorIi11VxSXRxhVFIjT2u6a0Z80iRk8vZMNH5oPqI\n\t vn+hxAIoiQd2w==",
        "From": "HACKE-RC <rc@rexion.ai>",
        "To": "Pablo Neira Ayuso <pablo@netfilter.org>,\n\tFlorian Westphal <fw@strlen.de>",
        "Cc": "Phil Sutter <phil@nwl.cc>,\n\t\"David S . Miller\" <davem@davemloft.net>,\n\tEric Dumazet <edumazet@google.com>,\n\tJakub Kicinski <kuba@kernel.org>,\n\tPaolo Abeni <pabeni@redhat.com>,\n\tSimon Horman <horms@kernel.org>,\n\tnetfilter-devel@vger.kernel.org,\n\tcoreteam@netfilter.org,\n\tnetdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tHACKE-RC <rc@rexion.ai>",
        "Subject": "[PATCH net-next 2/2] netfilter: nf_conntrack_amanda: reject port\n values above 65535",
        "Date": "Thu, 30 Apr 2026 21:45:15 +0530",
        "Message-ID": "<20260430161515.3449513-3-rc@rexion.ai>",
        "X-Mailer": "git-send-email 2.54.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",
        "X-Envelope-From": "rc@rexion.ai"
    },
    "content": "amanda_help() converts the result of simple_strtoul() to __be16 via\nhtons() without checking the parsed value fits in 16 bits. The\nexisting len > 5 guard limits strings to five digits, capping the\nparseable range at 99999, but values 65536-99999 still silently\ntruncate on the htons() conversion.\n\nUse an intermediate unsigned long and reject out-of-range values\nbefore converting to network byte order.\n\nFixes: 16958900578b (\"[NETFILTER]: nf_conntrack/nf_nat: add amanda helper port\")\nSigned-off-by: HACKE-RC <rc@rexion.ai>\n---\n net/netfilter/nf_conntrack_amanda.c | 10 ++++++----\n 1 file changed, 6 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/net/netfilter/nf_conntrack_amanda.c b/net/netfilter/nf_conntrack_amanda.c\nindex d2c09e8dd..58d6c9f29 100644\n--- a/net/netfilter/nf_conntrack_amanda.c\n+++ b/net/netfilter/nf_conntrack_amanda.c\n@@ -88,11 +88,12 @@ static int amanda_help(struct sk_buff *skb,\n \tstruct nf_conntrack_expect *exp;\n \tstruct nf_conntrack_tuple *tuple;\n \tunsigned int dataoff, start, stop, off, i;\n+\tnf_nat_amanda_hook_fn *nf_nat_amanda;\n \tchar pbuf[sizeof(\"65535\")], *tmp;\n+\tunsigned long parsed_port;\n+\tint ret = NF_ACCEPT;\n \tu_int16_t len;\n \t__be16 port;\n-\tint ret = NF_ACCEPT;\n-\tnf_nat_amanda_hook_fn *nf_nat_amanda;\n \n \t/* Only look at packets from the Amanda server */\n \tif (CTINFO2DIR(ctinfo) == IP_CT_DIR_ORIGINAL)\n@@ -132,10 +133,11 @@ static int amanda_help(struct sk_buff *skb,\n \t\t\tbreak;\n \t\tpbuf[len] = '\\0';\n \n-\t\tport = htons(simple_strtoul(pbuf, &tmp, 10));\n+\t\tparsed_port = simple_strtoul(pbuf, &tmp, 10);\n \t\tlen = tmp - pbuf;\n-\t\tif (port == 0 || len > 5)\n+\t\tif (parsed_port == 0 || parsed_port > 65535 || len > 5)\n \t\t\tbreak;\n+\t\tport = htons(parsed_port);\n \n \t\texp = nf_ct_expect_alloc(ct);\n \t\tif (exp == NULL) {\n",
    "prefixes": [
        "net-next",
        "2/2"
    ]
}