get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216444,
    "url": "http://patchwork.ozlabs.org/api/patches/2216444/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260326125153.685915-12-pablo@netfilter.org/",
    "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": "<20260326125153.685915-12-pablo@netfilter.org>",
    "list_archive_url": null,
    "date": "2026-03-26T12:51:52",
    "name": "[net,11/12] netfilter: nf_conntrack_sip: fix use of uninitialized rtp_addr in process_sdp",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": true,
    "hash": "7f89c131c0095f592ad2fa31b35d3f75bcc9672f",
    "submitter": {
        "id": 1315,
        "url": "http://patchwork.ozlabs.org/api/people/1315/?format=api",
        "name": "Pablo Neira Ayuso",
        "email": "pablo@netfilter.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260326125153.685915-12-pablo@netfilter.org/mbox/",
    "series": [
        {
            "id": 497584,
            "url": "http://patchwork.ozlabs.org/api/series/497584/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=497584",
            "date": "2026-03-26T12:51:41",
            "name": "[net,01/12] netfilter: nft_set_pipapo_avx2: don't return non-matching entry on expiry",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/497584/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216444/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216444/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-11449-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=SgKKZTeN;\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-11449-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=\"SgKKZTeN\"",
            "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 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 4fhP4b6Bl1z1yGD\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 23:59:43 +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 B1E273120224\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 12:52:26 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 2293F28853E;\n\tThu, 26 Mar 2026 12:52:14 +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 5ECF12690C0;\n\tThu, 26 Mar 2026 12:52:12 +0000 (UTC)",
            "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id 91E516026C;\n\tThu, 26 Mar 2026 13:52:10 +0100 (CET)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774529533; cv=none;\n b=keH6ihRT5Q4xrrIYaxl5szwfIs1ZYGMmlvdDWgOuZ4n/smfp4vFbg7/pVEmmsALuzFf6jhKdR6PS7UWi8oMTGXT7O5Z2kqacz5uoHwIKemRDaLpTtvUxEMijTaCsRFiae2m8VeMcFZVvXZ2DGUSqYsTiO7v/xwX259L1NjYxiiM=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774529533; c=relaxed/simple;\n\tbh=JmL4jT7/pY8p5XAOf8x0E4Bvm5soQhdankRVmIzdmdM=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=kvA5VsYRPx/IzQjmXiEUsb4voal2PNGieGDWexZdbArsR31THD80bD1dDuepHobPy4iuQyZXmDVboDov1mstnXh25mt+GL16p/vbIfp5Png1xv5QfPlmSU7feduU4IC7zSfrMMXyA0yR8q+H6LIoehDiqy8BtWKASnbxOwxGuGE=",
        "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=SgKKZTeN; 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=1774529531;\n\tbh=3hJxK5rllYA2kZvxgaWC+2ejMOnxVCOmuBD7UKfH31w=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=SgKKZTeNqDtH0i8+UYFG4nVzj1KQIQsg25lR+7ffH2JADCSaownvOgTV52shMZl3u\n\t b8eVJnM1a6p6e+q4JQ/38+5JBXhmkjx7cXmaqDF2Qxp0DjD+8+ueTx58gL9axzsDlG\n\t Hs5XP/FHGAaKF8FLKwxXfWXzlwpY2gyo0IIJfGbmL1mS8m6Rk1khQcKVB7tf2rBl82\n\t zLve+7aRMpxzm+eQX9+aYYQ9+5SRETiMwVgIMFatcC5Oige6yS1krPQXJBXvwoEvbX\n\t XTl0eyO9KxJF4SBzrc9iAA06xaxilKHBPySxp93WmPJ7igIJ1bStBC0L1DuGWADw3p\n\t f21fbbv2l22DA==",
        "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 11/12] netfilter: nf_conntrack_sip: fix use of\n uninitialized rtp_addr in process_sdp",
        "Date": "Thu, 26 Mar 2026 13:51:52 +0100",
        "Message-ID": "<20260326125153.685915-12-pablo@netfilter.org>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260326125153.685915-1-pablo@netfilter.org>",
        "References": "<20260326125153.685915-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: Weiming Shi <bestswngs@gmail.com>\n\nprocess_sdp() declares union nf_inet_addr rtp_addr on the stack and\npasses it to the nf_nat_sip sdp_session hook after walking the SDP\nmedia descriptions. However rtp_addr is only initialized inside the\nmedia loop when a recognized media type with a non-zero port is found.\n\nIf the SDP body contains no m= lines, only inactive media sections\n(m=audio 0 ...) or only unrecognized media types, rtp_addr is never\nassigned. Despite that, the function still calls hooks->sdp_session()\nwith &rtp_addr, causing nf_nat_sdp_session() to format the stale stack\nvalue as an IP address and rewrite the SDP session owner and connection\nlines with it.\n\nWith CONFIG_INIT_STACK_ALL_ZERO (default on most distributions) this\nresults in the session-level o= and c= addresses being rewritten to\n0.0.0.0 for inactive SDP sessions. Without stack auto-init the\nrewritten address is whatever happened to be on the stack.\n\nFix this by pre-initializing rtp_addr from the session-level connection\naddress (caddr) when available, and tracking via a have_rtp_addr flag\nwhether any valid address was established. Skip the sdp_session hook\nentirely when no valid address exists.\n\nFixes: 4ab9e64e5e3c (\"[NETFILTER]: nf_nat_sip: split up SDP mangling\")\nReported-by: Xiang Mei <xmei5@asu.edu>\nSigned-off-by: Weiming Shi <bestswngs@gmail.com>\nSigned-off-by: Florian Westphal <fw@strlen.de>\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\n net/netfilter/nf_conntrack_sip.c | 14 ++++++++++----\n 1 file changed, 10 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c\nindex 20e57cf5c83a..939502ff7c87 100644\n--- a/net/netfilter/nf_conntrack_sip.c\n+++ b/net/netfilter/nf_conntrack_sip.c\n@@ -1040,6 +1040,7 @@ static int process_sdp(struct sk_buff *skb, unsigned int protoff,\n \tunsigned int port;\n \tconst struct sdp_media_type *t;\n \tint ret = NF_ACCEPT;\n+\tbool have_rtp_addr = false;\n \n \thooks = rcu_dereference(nf_nat_sip_hooks);\n \n@@ -1056,8 +1057,11 @@ static int process_sdp(struct sk_buff *skb, unsigned int protoff,\n \tcaddr_len = 0;\n \tif (ct_sip_parse_sdp_addr(ct, *dptr, sdpoff, *datalen,\n \t\t\t\t  SDP_HDR_CONNECTION, SDP_HDR_MEDIA,\n-\t\t\t\t  &matchoff, &matchlen, &caddr) > 0)\n+\t\t\t\t  &matchoff, &matchlen, &caddr) > 0) {\n \t\tcaddr_len = matchlen;\n+\t\tmemcpy(&rtp_addr, &caddr, sizeof(rtp_addr));\n+\t\thave_rtp_addr = true;\n+\t}\n \n \tmediaoff = sdpoff;\n \tfor (i = 0; i < ARRAY_SIZE(sdp_media_types); ) {\n@@ -1091,9 +1095,11 @@ static int process_sdp(struct sk_buff *skb, unsigned int protoff,\n \t\t\t\t\t  &matchoff, &matchlen, &maddr) > 0) {\n \t\t\tmaddr_len = matchlen;\n \t\t\tmemcpy(&rtp_addr, &maddr, sizeof(rtp_addr));\n-\t\t} else if (caddr_len)\n+\t\t\thave_rtp_addr = true;\n+\t\t} else if (caddr_len) {\n \t\t\tmemcpy(&rtp_addr, &caddr, sizeof(rtp_addr));\n-\t\telse {\n+\t\t\thave_rtp_addr = true;\n+\t\t} else {\n \t\t\tnf_ct_helper_log(skb, ct, \"cannot parse SDP message\");\n \t\t\treturn NF_DROP;\n \t\t}\n@@ -1125,7 +1131,7 @@ static int process_sdp(struct sk_buff *skb, unsigned int protoff,\n \n \t/* Update session connection and owner addresses */\n \thooks = rcu_dereference(nf_nat_sip_hooks);\n-\tif (hooks && ct->status & IPS_NAT_MASK)\n+\tif (hooks && ct->status & IPS_NAT_MASK && have_rtp_addr)\n \t\tret = hooks->sdp_session(skb, protoff, dataoff,\n \t\t\t\t\t dptr, datalen, sdpoff,\n \t\t\t\t\t &rtp_addr);\n",
    "prefixes": [
        "net",
        "11/12"
    ]
}