get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2225376,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2225376/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260420220215.111510-8-pablo@netfilter.org/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<20260420220215.111510-8-pablo@netfilter.org>",
    "date": "2026-04-20T22:02:14",
    "name": "[net,7/8] netfilter: nfnetlink_osf: fix out-of-bounds read on option matching",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c724533932b7a951d97a3423969b2a6304c1c176",
    "submitter": {
        "id": 1315,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/1315/?format=api",
        "name": "Pablo Neira Ayuso",
        "email": "pablo@netfilter.org"
    },
    "delegate": {
        "id": 11902,
        "url": "http://patchwork.ozlabs.org/api/1.1/users/11902/?format=api",
        "username": "strlen",
        "first_name": "Florian",
        "last_name": "Westphal",
        "email": "fw@strlen.de"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260420220215.111510-8-pablo@netfilter.org/mbox/",
    "series": [
        {
            "id": 500691,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/500691/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=500691",
            "date": "2026-04-20T22:02:07",
            "name": "[net,1/8] netfilter: nft_osf: restrict it to ipv4",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500691/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2225376/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225376/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-12101-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=netfilter.org header.i=@netfilter.org\n header.a=rsa-sha256 header.s=2025 header.b=kz1geMoX;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-12101-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=\"kz1geMoX\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=217.70.190.124",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=netfilter.org"
        ],
        "Received": [
            "from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\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 4fzzym44Lpz1yJG\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 08:03:44 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id B87AB300CA39\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 22:02:54 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id CBF553D1719;\n\tMon, 20 Apr 2026 22:02:31 +0000 (UTC)",
            "from mail.netfilter.org (mail.netfilter.org [217.70.190.124])\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 01F513D16E7;\n\tMon, 20 Apr 2026 22:02:29 +0000 (UTC)",
            "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id 2508B60269;\n\tTue, 21 Apr 2026 00:02:28 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776722551; cv=none;\n b=Z3IL9sYR5Y0Q+DQP5fXce7ALmlUSGCBp9Iuu/EkcuLL/dqi/trCOQSVQvh6DMyhj6gXjZNAB2giWqtpobzFIoJjB117SW4Rtpd3VFmb2dr6P0nNZRnt15QgBNICHUL5JFzYBqIeOR0BK4LYVOT7/jEX+HA6FszGl/0QuDpnVSNU=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776722551; c=relaxed/simple;\n\tbh=AgaNzu1I6apmtJBryk603dr+KoFw6oDh9jzwgMwbWF8=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=p9+FCrqqfHoXTpvNaIrl/gEzr2+ZlwjO7tTlBPrkOaumN7VJt8+e4PtlbRq25V+jxYkhS+fuOsjoh/XA/GexpdwEOfiJdoYgfl+DD8RWjz0CSe6DPBctYTCATfJbP7z9bquwtMwziYwp443sjItcixsiuS/ziZWu5SH1XPtR7CU=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org;\n spf=pass smtp.mailfrom=netfilter.org;\n dkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=kz1geMoX; arc=none smtp.client-ip=217.70.190.124",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org;\n\ts=2025; t=1776722548;\n\tbh=PVB7UXPbS7DPHrW/VNCAqGnK0ENCpHD4L9AlwzELepY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=kz1geMoX6i/wSSkOU2X07IvPq/PKB2y2cJuC8SampOUjF2JHxufN92c+KkCtesBr0\n\t /EwDoov1XpyEVp6WhFtbRDN2iaTin1p8R565iHLuTp9R2JDaEr7TW+3/V38jr3z9U2\n\t PQJapKY+yAP6JOgXP9SMcR59WOYBtj+WKGFx+qkXPdLc4rrULmBt1V0X8VhjTk3IF5\n\t OMUwvmGvSM+ZmCxp/Daflj8ITJZY3LD8ZI2xaMGz5f2ZLqsLBfhKdb2X8tBrQuNSke\n\t 6LoVqC46nMbcQbrIFKNGoQDL0wzpUnjfe3ypWhS/KHDQeFKf2teOk1r+BvFDtggO/l\n\t pLHw5Ga03gutA==",
        "From": "Pablo Neira Ayuso <pablo@netfilter.org>",
        "To": "netfilter-devel@vger.kernel.org",
        "Cc": "davem@davemloft.net,\n\tnetdev@vger.kernel.org,\n\tkuba@kernel.org,\n\tpabeni@redhat.com,\n\tedumazet@google.com,\n\tfw@strlen.de,\n\thorms@kernel.org",
        "Subject": "[PATCH net 7/8] netfilter: nfnetlink_osf: fix out-of-bounds read on\n option matching",
        "Date": "Tue, 21 Apr 2026 00:02:14 +0200",
        "Message-ID": "<20260420220215.111510-8-pablo@netfilter.org>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260420220215.111510-1-pablo@netfilter.org>",
        "References": "<20260420220215.111510-1-pablo@netfilter.org>",
        "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": "From: Fernando Fernandez Mancera <fmancera@suse.de>\n\nIn nf_osf_match(), the nf_osf_hdr_ctx structure is initialized once\nand passed by reference to nf_osf_match_one() for each fingerprint\nchecked. During TCP option parsing, nf_osf_match_one() advances the\nshared ctx->optp pointer.\n\nIf a fingerprint perfectly matches, the function returns early without\nrestoring ctx->optp to its initial state. If the user has configured\nNF_OSF_LOGLEVEL_ALL, the loop continues to the next fingerprint.\nHowever, because ctx->optp was not restored, the next call to\nnf_osf_match_one() starts parsing from the end of the options buffer.\nThis causes subsequent matches to read garbage data and fail\nimmediately, making it impossible to log more than one match or logging\nincorrect matches.\n\nInstead of using a shared ctx->optp pointer, pass the context as a\nconstant pointer and use a local pointer (optp) for TCP option\ntraversal. This makes nf_osf_match_one() strictly stateless from the\ncaller's perspective, ensuring every fingerprint check starts at the\ncorrect option offset.\n\nFixes: 1a6a0951fc00 (\"netfilter: nfnetlink_osf: add missing fmatch check\")\nSuggested-by: Florian Westphal <fw@strlen.de>\nSigned-off-by: Fernando Fernandez Mancera <fmancera@suse.de>\nReviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\n net/netfilter/nfnetlink_osf.c | 19 ++++++++-----------\n 1 file changed, 8 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c\nindex 9de91fdd107c..9b209241029b 100644\n--- a/net/netfilter/nfnetlink_osf.c\n+++ b/net/netfilter/nfnetlink_osf.c\n@@ -64,9 +64,9 @@ struct nf_osf_hdr_ctx {\n static bool nf_osf_match_one(const struct sk_buff *skb,\n \t\t\t     const struct nf_osf_user_finger *f,\n \t\t\t     int ttl_check,\n-\t\t\t     struct nf_osf_hdr_ctx *ctx)\n+\t\t\t     const struct nf_osf_hdr_ctx *ctx)\n {\n-\tconst __u8 *optpinit = ctx->optp;\n+\tconst __u8 *optp = ctx->optp;\n \tunsigned int check_WSS = 0;\n \tint fmatch = FMATCH_WRONG;\n \tint foptsize, optnum;\n@@ -95,17 +95,17 @@ static bool nf_osf_match_one(const struct sk_buff *skb,\n \tcheck_WSS = f->wss.wc;\n \n \tfor (optnum = 0; optnum < f->opt_num; ++optnum) {\n-\t\tif (f->opt[optnum].kind == *ctx->optp) {\n+\t\tif (f->opt[optnum].kind == *optp) {\n \t\t\t__u32 len = f->opt[optnum].length;\n-\t\t\tconst __u8 *optend = ctx->optp + len;\n+\t\t\tconst __u8 *optend = optp + len;\n \n \t\t\tfmatch = FMATCH_OK;\n \n-\t\t\tswitch (*ctx->optp) {\n+\t\t\tswitch (*optp) {\n \t\t\tcase OSFOPT_MSS:\n-\t\t\t\tmss = ctx->optp[3];\n+\t\t\t\tmss = optp[3];\n \t\t\t\tmss <<= 8;\n-\t\t\t\tmss |= ctx->optp[2];\n+\t\t\t\tmss |= optp[2];\n \n \t\t\t\tmss = ntohs((__force __be16)mss);\n \t\t\t\tbreak;\n@@ -113,7 +113,7 @@ static bool nf_osf_match_one(const struct sk_buff *skb,\n \t\t\t\tbreak;\n \t\t\t}\n \n-\t\t\tctx->optp = optend;\n+\t\t\toptp = optend;\n \t\t} else\n \t\t\tfmatch = FMATCH_OPT_WRONG;\n \n@@ -156,9 +156,6 @@ static bool nf_osf_match_one(const struct sk_buff *skb,\n \t\t}\n \t}\n \n-\tif (fmatch != FMATCH_OK)\n-\t\tctx->optp = optpinit;\n-\n \treturn fmatch == FMATCH_OK;\n }\n \n",
    "prefixes": [
        "net",
        "7/8"
    ]
}