From: Chris Arges <carges@cloudflare.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-kernel@vger.kernel.org,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
"Jason Wang" <jasowangio@gmail.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
netdev@vger.kernel.org, virtualization@lists.linux.dev,
"Rusty Russell" <rusty@rustcorp.com.au>,
"Max Krasnyansky" <maxk@qualcomm.com>
Subject: Re: [PATCH net-next v2 0/7] more virtio-net csum hardening
Date: Thu, 15 Oct 2026 14:21:40 -0500 [thread overview]
Message-ID: <atEnxBYUQNkjUXfA@20HS2G4> (raw)
In-Reply-To: <cover.1792067836.git.mst@redhat.com>
On 2026-10-15 08:41:12, Michael S. Tsirkin wrote:
>
> As reported first by Paulos Yibelo <habte.yibelo@gmail.com> (after which
> others, credited below, found more ways the bug can affect users):
>
> allowing untrusted hardware to specify csum start/offset for
> CHECKSUM_PARTIAL was not a good idea, because, if it edits the packet
> outside the actual checksum, and depending on the setup, the networking
> stack could be looking at the packet both before and after the edit, and
> seeing different results.
>
> Previously, commit 6785011f8b16 ("ipv4: validate checksum_start before
> completing checksum") validated all known instances where this
> causes the most grief, but the real fix is to make sure
> that either only actual checksum fields are ever edited,
> or the checksum is completed before the net stack looks at it,
> so it is always consistent.
>
>
> This basically goes back to
> what we did before f43798c27684 ("tun: Allow GSO using virtio_net_hdr"),
> except in a narrow list of specified known good cases.
>
>
> Summary of the patchset:
> net: account for ingress-resolved virtio net hdr state
> - accounting, not the fix itself, dependency of the next one
> net: resolve uncommon partial checksums at ingress
> - fix itself
> net: add a sysctl to opt out of virtio net hdr checksum validation
> - reducing risk of the fix by adding a sysctl to disable it
> net: add ip4_parse()
> virtio_net: cleanup protocol calculation
> - cleanup resulting code duplication
> (kept separate to simplify backporting)
>
> Fixes: f43798c27684 ("tun: Allow GSO using virtio_net_hdr")
>
> Changes since v1:
> - reorder patches to fix bisectability, addressing
> a comment by Björn Töpel.
> - code refactoring, different patch splitup,
> a sysctl knob to disable as suggested by Willem de Bruijn.
> - fix a bunch of minor issues spotted by LLMs
>
>
> Michael S. Tsirkin (7):
> net: account for ingress-resolved virtio net hdr state
> um: vector: honor virtio net hdr conversion failures
> um: vector: trim skbs before verifying the header
> net: resolve uncommon partial checksums at ingress
> net: add a sysctl to opt out of virtio net hdr checksum validation
> net: add ip4_parse()
> virtio_net: cleanup protocol calculation
>
> Documentation/admin-guide/sysctl/net.rst | 15 ++
> arch/um/drivers/vector_kern.c | 6 +-
> arch/um/drivers/vector_transports.c | 4 +-
> drivers/net/tap.c | 4 +-
> drivers/net/tun.c | 41 +++-
> drivers/net/virtio_net.c | 2 +-
> include/linux/ip.h | 24 +++
> include/linux/virtio_net.h | 249 ++++++++++++++++++++++-
> include/net/netns/core.h | 1 +
> net/bridge/br_netfilter_hooks.c | 15 +-
> net/core/dev.c | 6 +
> net/core/net_namespace.c | 1 +
> net/core/sysctl_net_core.c | 54 +++++
> net/ipv4/ip_input.c | 13 +-
> net/ipv4/netfilter/nf_reject_ipv4.c | 13 +-
> net/packet/af_packet.c | 4 +-
> 16 files changed, 404 insertions(+), 48 deletions(-)
>
> --
> MST
>
Aside from the KASAN issue described in the other thread, I was able to
test this series and it fixes my local testcases.
Tested-by: Chris Arges <carges@cloudflare.com>
prev parent reply other threads:[~2026-10-15 19:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 12:41 [PATCH net-next v2 0/7] more virtio-net csum hardening Michael S. Tsirkin
2026-10-15 12:41 ` [PATCH net-next v2 1/7] net: account for ingress-resolved virtio net hdr state Michael S. Tsirkin
2026-10-15 12:41 ` [PATCH net-next v2 2/7] um: vector: honor virtio net hdr conversion failures Michael S. Tsirkin
2026-10-15 12:47 ` Johannes Berg
2026-10-15 12:52 ` Michael S. Tsirkin
2026-10-15 12:55 ` Johannes Berg
2026-10-15 17:19 ` Willem de Bruijn
2026-10-15 12:41 ` [PATCH net-next v2 3/7] um: vector: trim skbs before verifying the header Michael S. Tsirkin
2026-10-15 12:41 ` [PATCH net-next v2 4/7] net: resolve uncommon partial checksums at ingress Michael S. Tsirkin
2026-10-15 17:43 ` Willem de Bruijn
2026-10-15 19:18 ` Chris Arges
2026-10-15 18:04 ` Willem de Bruijn
2026-10-15 18:07 ` Willem de Bruijn
2026-10-15 12:41 ` [PATCH net-next v2 5/7] net: add a sysctl to opt out of virtio net hdr checksum validation Michael S. Tsirkin
2026-10-15 17:50 ` Willem de Bruijn
2026-10-15 12:41 ` [PATCH net-next v2 6/7] net: add ip4_parse() Michael S. Tsirkin
2026-10-15 18:51 ` Phil Sutter
2026-10-15 12:41 ` [PATCH net-next v2 7/7] virtio_net: cleanup protocol calculation Michael S. Tsirkin
2026-10-15 19:21 ` Chris Arges [this message]
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=atEnxBYUQNkjUXfA@20HS2G4 \
--to=carges@cloudflare.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=eperezma@redhat.com \
--cc=jasowangio@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rusty@rustcorp.com.au \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.