From: sashiko-bot@kernel.org
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtualization@lists.linux.dev, "Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net-next v2 2/7] um: vector: honor virtio net hdr conversion failures
Date: Fri, 16 Oct 2026 12:42:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-174317@kernel.org> (raw)
In-Reply-To: <6716834884238de0ab1ab313004044122aa2adbf.1792067836.git.mst@redhat.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] um: vector: GSO metadata lost for packets with VIRTIO_NET_HDR_F_DATA_VALID
--
commit 7c2ce8bab142738766afdbfe57333f1e8eb84738
Author: Michael S. Tsirkin <mst@redhat.com>
um: vector: honor virtio net hdr conversion failures
virtio_net_hdr_to_skb() refuses packets whose checksum metadata
it cannot make sense of, but the vector raw transport ignored
its return value: rejected packets went on into the stack with
their metadata unvalidated.
Propagate the failure.
> diff --git a/arch/um/drivers/vector_transports.c b/arch/um/drivers/vector_transports.c
> index e1fb2a76fdff5..8b75484586635 100644
> --- a/arch/um/drivers/vector_transports.c
> +++ b/arch/um/drivers/vector_transports.c
> @@ -210,7 +210,9 @@ static int raw_verify_header(
> return 1;
>
> skb_set_network_header(skb, ETH_HLEN);
> - virtio_net_hdr_to_skb(skb, vheader, virtio_legacy_is_little_endian());
> + if (virtio_net_hdr_to_skb(skb, vheader,
> + virtio_legacy_is_little_endian()) < 0)
> + return -1;
[Severity: High]
Does the early return above this block cause GSO packets to lose metadata?
Looking at raw_verify_header(), if VIRTIO_NET_HDR_F_DATA_VALID is set in
the virtio network header, the function returns 1 early:
if ((vheader->flags & VIRTIO_NET_HDR_F_DATA_VALID) > 0)
return 1;
This skips the call to virtio_net_hdr_to_skb(), which is responsible for
parsing and populating GSO metadata like gso_size and gso_type.
For large GSO packets that happen to have VIRTIO_NET_HDR_F_DATA_VALID set
(such as fully checksummed GSO frames from host TAP devices), would skipping
this setup cause the SKB to be passed up to the network stack as an
unsegmented giant packet?
The network stack would likely drop these oversized packets since they exceed
the device MTU and lack GSO segmentation metadata, causing silent data loss
and breaking TCP/UDP connectivity for these specific offloaded flows.
> return 0;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1792067836.git.mst@redhat.com?part=2
next prev parent reply other threads:[~2026-10-16 12:42 UTC|newest]
Thread overview: 46+ 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-16 12:42 ` sashiko-bot
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-16 9:37 ` Michael S. Tsirkin
2026-10-16 9:43 ` Michael S. Tsirkin
2026-10-16 9:44 ` Johannes Berg
2026-10-16 9:47 ` Michael S. Tsirkin
2026-10-16 9:49 ` Johannes Berg
2026-10-16 9:53 ` Michael S. Tsirkin
2026-10-15 17:19 ` Willem de Bruijn
2026-10-16 9:40 ` Michael S. Tsirkin
2026-10-16 12:42 ` sashiko-bot [this message]
2026-10-15 12:41 ` [PATCH net-next v2 3/7] um: vector: trim skbs before verifying the header Michael S. Tsirkin
2026-10-16 12:42 ` sashiko-bot
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-16 9:34 ` Michael S. Tsirkin
2026-10-16 9:36 ` Michael S. Tsirkin
2026-10-15 18:04 ` Willem de Bruijn
2026-10-15 18:07 ` Willem de Bruijn
2026-10-16 10:02 ` Michael S. Tsirkin
2026-10-16 12:42 ` sashiko-bot
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-16 9:33 ` Michael S. Tsirkin
2026-10-16 15:30 ` Willem de Bruijn
2026-10-16 17:51 ` Michael S. Tsirkin
2026-10-16 18:19 ` Willem de Bruijn
2026-10-16 18:40 ` Michael S. Tsirkin
2026-10-17 1:09 ` Willem de Bruijn
2026-10-16 17:55 ` Michael S. Tsirkin
2026-10-16 18:17 ` Willem de Bruijn
2026-10-16 12:42 ` sashiko-bot
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-16 11:56 ` Björn Töpel
2026-10-16 12:42 ` sashiko-bot
2026-10-15 12:41 ` [PATCH net-next v2 7/7] virtio_net: cleanup protocol calculation Michael S. Tsirkin
2026-10-16 11:52 ` Björn Töpel
2026-10-16 12:42 ` sashiko-bot
2026-10-15 19:21 ` [PATCH net-next v2 0/7] more virtio-net csum hardening Chris Arges
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=sashiko-outbox-174317@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
/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.