From: Paulos Yibelo <habte.yibelo@gmail.com>
To: netdev@vger.kernel.org
Cc: richard@nod.at, anton.ivanov@cambridgegreys.com,
johannes@sipsolutions.net, willemdebruijn.kernel@gmail.com,
jasowangio@gmail.com, mst@redhat.com, eperezma@redhat.com,
xuanzhuo@linux.alibaba.com, andrew+netdev@lunn.ch,
pablo@netfilter.org, fw@strlen.de, phil@nwl.cc,
razor@blackwall.org, idosch@nvidia.com, dsahern@kernel.org,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org,
linux-um@lists.infradead.org, virtualization@lists.linux.dev,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
bridge@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH net v6 0/2] net: prevent partial checksums from modifying network headers
Date: Mon, 21 Sep 2026 23:03:08 -0400 [thread overview]
Message-ID: <20260922030310.8684-1-habte.yibelo@gmail.com> (raw)
A virtio-net header can supply CHECKSUM_PARTIAL metadata whose checksum
start resolves inside a network header. Software checksum completion can
then modify bytes the stack has already parsed.
Patch 1 checks the data-relative L3 origin in the virtio-net conversion
paths. Patch 2 checks the parsed header length before checksum completion
in IPv4 and IPv6 fragmentation paths.
Changes in v6 address Michael S. Tsirkin's review of v5:
- Name the Ethernet-only L3 parser accordingly.
- Derive the AF_PACKET L3 offset and protocol from the actual Ethernet
frame, including inline VLAN tags on an ETH_P_IP raw socket.
- Use the IPv6 base-header minimum for IPv6 checksum-only packets,
including IFF_TUN before skb->protocol is set.
- Restore Assisted-by: LLM on both patches. Patch 2's code is unchanged.
Validation: focused x86 allmodconfig and UML defconfig W=1 object builds,
strict checkpatch, and application of the exact mail series to the stated
base. No runtime regression reproducer was run.
Link: https://lore.kernel.org/netdev/20260921025341.44846-1-habte.yibelo@gmail.com/
Paulos Yibelo (2):
net: validate virtio checksum start after network header
ip: reject partial checksums covering network headers
arch/um/drivers/vector_transports.c | 13 +++-
drivers/net/tun_vnet.h | 52 ++++++++++++-
drivers/net/virtio_net.c | 10 ++-
include/linux/virtio_net.h | 87 ++++++++++++++++++----
net/bridge/netfilter/nf_conntrack_bridge.c | 21 ++++--
net/ipv4/ip_output.c | 23 ++++--
net/ipv6/ip6_output.c | 12 ++-
net/ipv6/netfilter.c | 12 ++-
net/packet/af_packet.c | 24 +++++-
9 files changed, 214 insertions(+), 40 deletions(-)
base-commit: 1e24c4f2ee44be0eee94092b5d13cbdb4bdf0d60
--
2.46.0
next reply other threads:[~2026-09-22 3:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 3:03 Paulos Yibelo [this message]
2026-09-22 3:03 ` [PATCH net v6 1/2] net: validate virtio checksum start after network header Paulos Yibelo
2026-09-22 5:14 ` Michael S. Tsirkin
[not found] ` <CAHv8Y_4OKdVkigToBmXXhhUxu+EL2iWVADZJ=LS4CGqBATgU5g@mail.gmail.com>
2026-09-22 5:55 ` Johannes Berg
2026-09-22 5:56 ` Johannes Berg
2026-09-22 8:46 ` Michael S. Tsirkin
2026-09-22 22:29 ` Willem de Bruijn
2026-09-23 1:27 ` Willem de Bruijn
2026-09-23 10:21 ` Michael S. Tsirkin
2026-09-23 10:46 ` Eric Dumazet
2026-09-24 2:02 ` Michael S. Tsirkin
2026-09-24 17:18 ` Jakub Kicinski
2026-09-22 3:03 ` [PATCH net v6 2/2] ip: reject partial checksums covering network headers Paulos Yibelo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260922030310.8684-1-habte.yibelo@gmail.com \
--to=habte.yibelo@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=anton.ivanov@cambridgegreys.com \
--cc=bridge@lists.linux.dev \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=jasowangio@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
--cc=razor@blackwall.org \
--cc=richard@nod.at \
--cc=virtualization@lists.linux.dev \
--cc=willemdebruijn.kernel@gmail.com \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®