All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-72046: gve: fix header buffer corruption with header-split and HW-GRO
@ 2026-08-15  6:02 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-08-15  6:02 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

From: Greg Kroah-Hartman <gregkh@kernel.org>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

gve: fix header buffer corruption with header-split and HW-GRO

The DQO RX datapath programs a per-buffer-queue-descriptor
header_buf_addr at post time and reads the split header back at
completion time. Both the post and the read currently index the
header buffer by queue position rather than by the buffer's identity:

  - post (gve_rx_post_buffers_dqo): header_buf_addr is computed from
    bufq->tail
  - read (gve_rx_dqo): the header is read from desc_idx (the completion
    queue head index)

This relies on the buffer-queue index and the completion-queue index
being equal for the start of every packet, i.e. on the device consuming
posted buffers and returning completions in the exact same order. That
assumption does not hold once HW-GRO is enabled with multiple
flows: coalesced segments are accepted and completed in an order that
may differ from the order buffers were posted, and segments from
different flows may interleave.

That results in two problems:

1. Wrong header slot on read. Because the read offset is derived from
   the completion index (desc_idx) while the device wrote the header to
   the address programmed for the buffer's buf_id, the driver can copy
   a header belonging to a different packet. This shows up as
   throughput drop (about 30% drop and large numbers of TCP
   retransmissions) with header-split and HW-GRO both enabled and many
   streams.

2. Header buffer reused while still owned by the device. The driver
   advances bufq->head by one per completion and re-posts buffers based
   on that. Arrival of N RX completions only guarantees that at least N
   RX buffer descriptors have been read by the device. It does not
   guarantee that the device has relinquished the ownership of all the
   buffers corresponding to those N descriptors. With out-of-order
   completions (e.g. the completion for a packet copied into buffer N
   arrives before the completion for a packet copied into buffer N-1),
   the driver can re-post and overwrite a header buffer that the device
   is still going to write into, corrupting the header of a packet
   whose completion has not yet been processed.

Fix both issues by indexing the header buffer by buf_id on both the post
and read paths. Reading from buf_id's slot is therefore always correct
regardless of completion ordering (fixes problem 1).

Indexing by buf_id also ties each header slot to the lifetime of its
buffer state. A buffer state is only returned to the free/recycle lists
when its own completion (buf_id) is processed, so its header slot can
only be re-posted after the device is done with it. This makes header
slot reuse safe under out-of-order completions (fixes problem 2).

Allocate (gve_rx_alloc_hdr_bufs) and free (gve_rx_free_hdr_bufs) the
header buffers based on num_buf_states to match the buf_id indexing.

The Linux kernel CVE team has assigned CVE-2026-72046 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 6.9 with commit 5e37d8254e7f551dda62e7590e819d69c7491845 and fixed in 6.12.101 with commit 84d3753d4bf284ef770ead6dee2270aaabb3ef41
	Issue introduced in 6.9 with commit 5e37d8254e7f551dda62e7590e819d69c7491845 and fixed in 6.18.40 with commit 35267819b25074084130b6a7be18bbaf44d3ae74
	Issue introduced in 6.9 with commit 5e37d8254e7f551dda62e7590e819d69c7491845 and fixed in 7.1.5 with commit 9f8e7f59b0c2f466be74bd923726b0f5496c27ad
	Issue introduced in 6.9 with commit 5e37d8254e7f551dda62e7590e819d69c7491845 and fixed in 7.2-rc1 with commit d676c9a73bdcd8237425dbb826f2bd1a25c36e40

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-72046
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	drivers/net/ethernet/google/gve/gve_rx_dqo.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/84d3753d4bf284ef770ead6dee2270aaabb3ef41
	https://git.kernel.org/stable/c/35267819b25074084130b6a7be18bbaf44d3ae74
	https://git.kernel.org/stable/c/9f8e7f59b0c2f466be74bd923726b0f5496c27ad
	https://git.kernel.org/stable/c/d676c9a73bdcd8237425dbb826f2bd1a25c36e40

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-15  6:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-15  6:02 CVE-2026-72046: gve: fix header buffer corruption with header-split and HW-GRO Greg Kroah-Hartman

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.