{"id":2220995,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2220995/?format=json","web_url":"http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260408163512.30537-5-fw@strlen.de/","project":{"id":26,"url":"http://patchwork.ozlabs.org/api/1.1/projects/26/?format=json","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":"<20260408163512.30537-5-fw@strlen.de>","date":"2026-04-08T16:35:09","name":"[net,4/7] netfilter: ip6t_eui64: reject invalid MAC header for all packets","commit_ref":null,"pull_url":null,"state":"accepted","archived":true,"hash":"3ab7e9f3f0355c115ac542c17f4e9ae2c1804225","submitter":{"id":1025,"url":"http://patchwork.ozlabs.org/api/1.1/people/1025/?format=json","name":"Florian Westphal","email":"fw@strlen.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260408163512.30537-5-fw@strlen.de/mbox/","series":[{"id":499159,"url":"http://patchwork.ozlabs.org/api/1.1/series/499159/?format=json","web_url":"http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=499159","date":"2026-04-08T16:35:05","name":"[net,1/7] ipvs: fix NULL deref in ip_vs_add_service error path","version":1,"mbox":"http://patchwork.ozlabs.org/series/499159/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2220995/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2220995/checks/","tags":{},"headers":{"Return-Path":"\n <netfilter-devel+bounces-11742-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=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11742-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\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 4frTJw1nqgz1xv0\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 02:38:24 +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 76C693069031\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  8 Apr 2026 16:35:37 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A88D23CFF5A;\n\tWed,  8 Apr 2026 16:35:35 +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 42FAB346FC4;\n\tWed,  8 Apr 2026 16:35:34 +0000 (UTC)","by Chamillionaire.breakpoint.cc (Postfix, from userid 1003)\n\tid A392B60560; Wed, 08 Apr 2026 18:35:32 +0200 (CEST)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775666135; cv=none;\n b=JAalVQ3BGMhXr1wBHN74A7NW/nNSkV55n8Oa3JpP1hssaOi0mVbk3fY/BB5dP9Q3C0gUf7HXYR66QiQ2KJ5z4CwjB9TJDrUQ4shmszirPR0wBbDEN0KPP+ks2ez51czukmWKDtxDt0uUhx2CTfTYWHvYS5v/IkZDzXa6NXIPHMM=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775666135; c=relaxed/simple;\n\tbh=xr5FSvfDLj8j3wV01t8Knr4ZkFGX5FbMXBoh6KAbX3E=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=kjNFBeDp31eNOp/9ocz6eEHTK2djIh4VfvyokLa/hU8c6eoFSGyvgixQSLoEjLbtUdWfqKVTDmziXkI6efSky3+rT/pr7iXRO7vimNq7ESjLWgA0RhbqnraymUkuXaKbQzcYRaDno7yvqX5V1IxNW42O3zvhFkM73vpXX4Py3Po=","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":"<netdev@vger.kernel.org>","Cc":"Paolo Abeni <pabeni@redhat.com>,\n\t\"David S. Miller\" <davem@davemloft.net>,\n\tEric Dumazet <edumazet@google.com>,\n\tJakub Kicinski <kuba@kernel.org>,\n\t<netfilter-devel@vger.kernel.org>,\n\tpablo@netfilter.org","Subject":"[PATCH net 4/7] netfilter: ip6t_eui64: reject invalid MAC header for\n all packets","Date":"Wed,  8 Apr 2026 18:35:09 +0200","Message-ID":"<20260408163512.30537-5-fw@strlen.de>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260408163512.30537-1-fw@strlen.de>","References":"<20260408163512.30537-1-fw@strlen.de>","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: Zhengchuan Liang <zcliangcn@gmail.com>\n\n`eui64_mt6()` derives a modified EUI-64 from the Ethernet source address\nand compares it with the low 64 bits of the IPv6 source address.\n\nThe existing guard only rejects an invalid MAC header when\n`par->fragoff != 0`. For packets with `par->fragoff == 0`, `eui64_mt6()`\ncan still reach `eth_hdr(skb)` even when the MAC header is not valid.\n\nFix this by removing the `par->fragoff != 0` condition so that packets\nwith an invalid MAC header are rejected before accessing `eth_hdr(skb)`.\n\nFixes: 1da177e4c3f41 (\"Linux-2.6.12-rc2\")\nReported-by: Yifan Wu <yifanwucs@gmail.com>\nReported-by: Juefei Pu <tomapufckgml@gmail.com>\nCo-developed-by: Yuan Tan <yuantan098@gmail.com>\nSigned-off-by: Yuan Tan <yuantan098@gmail.com>\nSuggested-by: Xin Liu <bird@lzu.edu.cn>\nTested-by: Ren Wei <enjou1224z@gmail.com>\nSigned-off-by: Zhengchuan Liang <zcliangcn@gmail.com>\nSigned-off-by: Ren Wei <n05ec@lzu.edu.cn>\nSigned-off-by: Florian Westphal <fw@strlen.de>\n---\n net/ipv6/netfilter/ip6t_eui64.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)","diff":"diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c\nindex d704f7ed300c..da69a27e8332 100644\n--- a/net/ipv6/netfilter/ip6t_eui64.c\n+++ b/net/ipv6/netfilter/ip6t_eui64.c\n@@ -22,8 +22,7 @@ eui64_mt6(const struct sk_buff *skb, struct xt_action_param *par)\n \tunsigned char eui64[8];\n \n \tif (!(skb_mac_header(skb) >= skb->head &&\n-\t      skb_mac_header(skb) + ETH_HLEN <= skb->data) &&\n-\t    par->fragoff != 0) {\n+\t      skb_mac_header(skb) + ETH_HLEN <= skb->data)) {\n \t\tpar->hotdrop = true;\n \t\treturn false;\n \t}\n","prefixes":["net","4/7"]}