Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2223079/?format=api
{ "id": 2223079, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2223079/?format=api", "project": { "id": 26, "url": "http://patchwork.ozlabs.org/api/1.0/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": "<20260414111722.6944-1-pablo@netfilter.org>", "date": "2026-04-14T11:17:22", "name": "[nf] netfilter: nfnetlink_osf: fix divide-by-zero in OSF_WSS_MODULO", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f1d5b4e4b4627d38e66df8d0ef599c4daf9654b2", "submitter": { "id": 1315, "url": "http://patchwork.ozlabs.org/api/1.0/people/1315/?format=api", "name": "Pablo Neira Ayuso", "email": "pablo@netfilter.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260414111722.6944-1-pablo@netfilter.org/mbox/", "series": [ { "id": 499820, "url": "http://patchwork.ozlabs.org/api/1.0/series/499820/?format=api", "date": "2026-04-14T11:17:22", "name": "[nf] netfilter: nfnetlink_osf: fix divide-by-zero in OSF_WSS_MODULO", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499820/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223079/checks/", "tags": {}, "headers": { "Return-Path": "\n <netfilter-devel+bounces-11872-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=QHjVXbzk;\n\tdkim-atps=neutral", "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-11872-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=\"QHjVXbzk\"", "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 [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 4fw1xF4vJsz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 21:18:41 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 1C357301D6B9\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 11:17:30 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id AA84E313E15;\n\tTue, 14 Apr 2026 11:17:29 +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 121243914F0\n\tfor <netfilter-devel@vger.kernel.org>; Tue, 14 Apr 2026 11:17:27 +0000 (UTC)", "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id 1D13360278;\n\tTue, 14 Apr 2026 13:17:26 +0200 (CEST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776165449; cv=none;\n b=inCKZ92vvOc+j4BtzJY47hTCOsgDxFgEAzYV8+j5b5hmzPs/9nMkls3MTzYbB+sc/FBWezKF9Jy19gLa78Ar4OSVzYTIqIu/BQpN3LAEF4kbuPdVUFFlMURtyLVCna13y6k9CeUBe7heBUOABX2REOCBatfeX5bRWh4G38RW+qw=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776165449; c=relaxed/simple;\n\tbh=vCdfaW9akuSEUpT3dkrjHG7m4BNmGyZtjh6I7q+cFOA=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=LpjAhUjjDGOTDZVI6YRE8Urckyn4bjDn6FH1d3INr/OXP4088acJtjkTRv27vCth3liof2fwMzETUGPiX/QvhzL5lS7driBPRp5WFNToSQuVgtEWoJIPZ3jCIEuLEsyXPF+LDmaE1jC/iT1U66MOm7sdjQuio1pYXcz/HWf50v4=", "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=QHjVXbzk; 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=1776165446;\n\tbh=TW/05Cad82CW+FmpDAPNt1XPirSEQeexMK7TY5O/ukE=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=QHjVXbzklRRFXZMYmRiCl1n8mKTHH2zywSxgb/RqFp+6W+fZHskLRDqEoI5Z6/HT/\n\t vTQbldSgKA8z2jizGR4sBcCuM+JLRchLnIvlgRoJ9frhYYaueXbQpDqEGyBWaNHsXS\n\t jztgegea5kHtS4A1l/PX0sRXqg4p9+VbC8NacZB7nb0FH0kqHCbywgV2jNsJxHbzGh\n\t hYwV6fnecNMIbs/zMah5FqYY0fbANIZkwPR5K8D2JVhIuk8gM/kugP7llUrgryCsFB\n\t Vm/gx3frqrpT3jTdVodAXuXYMepCfUIK1sbVPCe+4b6UTewDo9WOlxVF9ZGnhLS4J1\n\t z9+EgP4UvxQFA==", "From": "Pablo Neira Ayuso <pablo@netfilter.org>", "To": "netfilter-devel@vger.kernel.org", "Cc": "xmei5@asu.edu,\n\tfw@strlen.de", "Subject": "[PATCH nf] netfilter: nfnetlink_osf: fix divide-by-zero in\n OSF_WSS_MODULO", "Date": "Tue, 14 Apr 2026 13:17:22 +0200", "Message-ID": "<20260414111722.6944-1-pablo@netfilter.org>", "X-Mailer": "git-send-email 2.47.3", "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": "Xiang Mei says:\n\nThe OSF_WSS_MODULO branch in nf_osf_match_one() performs:\n\n ctx->window % f->wss.val\n\nwithout guarding against f->wss.val == 0. A user with CAP_NET_ADMIN\ncan add an OSF fingerprint with wss.wc = OSF_WSS_MODULO and wss.val = 0\nvia nfnetlink. When a matching TCP SYN packet arrives, the kernel\nexecutes a division by zero and panics.\n\nThe OSF_WSS_PLAIN case already treats val == 0 as a wildcard (match\neverything). Apply the same semantics to OSF_WSS_MODULO: if val is 0,\nany window value matches rather than dividing by zero.\n\nCrash:\n Oops: divide error: 0000 [#1] SMP KASAN NOPTI\n RIP: 0010:nf_osf_match_one (net/netfilter/nfnetlink_osf.c:98)\n Call Trace:\n <IRQ>\n nf_osf_match (net/netfilter/nfnetlink_osf.c:220 (discriminator 6))\n xt_osf_match_packet (net/netfilter/xt_osf.c:32)\n ipt_do_table (net/ipv4/netfilter/ip_tables.c:348)\n nf_hook_slow (net/netfilter/core.c:622 (discriminator 1))\n ip_local_deliver (net/ipv4/ip_input.c:265)\n ip_rcv (include/linux/skbuff.h:1162)\n __netif_receive_skb_one_core (net/core/dev.c:6181)\n process_backlog (.include/linux/skbuff.h:2502 net/core/dev.c:6642)\n __napi_poll (net/core/dev.c:7710)\n net_rx_action (net/core/dev.c:7945)\n handle_softirqs (kernel/softirq.c:622\n\nFix this from control plane, reject f->wss.val == 0 if wss.ws is\nOSF_WSS_MODULO.\n\nFixes: 11eeef41d5f6 (\"netfilter: passive OS fingerprint xtables match\")\nReported-by: Xiang Mei <xmei5@asu.edu>\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\nApologies, I don't mean to step on your feet with this patch.\nThis just expedites scrutiny before PR submission.\n\n net/netfilter/nfnetlink_osf.c | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c\nindex 5d15651c74f0..bf47a3812910 100644\n--- a/net/netfilter/nfnetlink_osf.c\n+++ b/net/netfilter/nfnetlink_osf.c\n@@ -329,6 +329,15 @@ static int nfnl_osf_add_callback(struct sk_buff *skb,\n \t\tif (f->opt[i].kind == OSFOPT_MSS && f->opt[i].length < 4)\n \t\t\treturn -EINVAL;\n \n+\t\tswitch (f->wss.wc) {\n+\t\tcase OSF_WSS_MODULO:\n+\t\t\tif (f->wss.val == 0)\n+\t\t\t\treturn -EINVAL;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tbreak;\n+\t\t}\n+\n \t\ttot_opt_len += f->opt[i].length;\n \t\tif (tot_opt_len > MAX_IPOPTLEN)\n \t\t\treturn -EINVAL;\n", "prefixes": [ "nf" ] }