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:
-
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.
-
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.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - The flaw is in the GVE driver RX NAPI path triggered by incoming network frames; a remote peer can reach gve_rx_dqo()/gve_rx_post_buffers_dqo() by sending TCP traffic to an internet-facing GVE interface (e.g., GCP VM) without local access.
AC:L - Once header-split and HW-GRO are enabled, an attacker can reliably trigger out-of-order HW-GRO completions by opening many concurrent TCP flows to the target; no race against uncontrollable victim state is required beyond normal multi-stream traffic patterns.
PR:N - Exploitation requires only the ability to send network packets to the host; no local account, capabilities, or authentication on the victim is needed. Header-split being enabled is victim configuration, not attacker privilege.
UI:N - No victim user action is required during exploitation beyond the host already receiving network traffic on its GVE interface; the attacker does not depend on the user mounting filesystems or opening files.
S:U - Impact is confined to the guest kernel network stack and driver DMA header buffers on the affected VM; it does not cross a VM/host or IOMMU security boundary to affect the hypervisor or other tenants.
C:H - Out-of-order completions cause the driver to read the wrong header slot, mixing headers between packets/flows and disclosing other connections' L3/L4 header bytes; premature header-buffer reuse also corrupts DMA data the driver later copies into skbs.
I:H - The driver can repost and overwrite header DMA buffers while the device is still writing them, corrupting packet headers fed into the stack; wrong headers paired with payloads can break protocol parsing and constitutes exploitable kernel memory corruption.
A:H - The bug causes severe TCP throughput collapse, massive retransmissions, and dropped/corrupted packets; header-buffer corruption and malformed skbs can also destabilize the kernel RX path and cause oopses or loss of network availability on the host.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - The flaw is in the GVE driver RX NAPI path triggered by incoming network frames; a remote peer can reach gve_rx_dqo()/gve_rx_post_buffers_dqo() by sending TCP traffic to an internet-facing GVE interface (e.g., GCP VM) without local access.
AC:L - Once header-split and HW-GRO are enabled, an attacker can reliably trigger out-of-order HW-GRO completions by opening many concurrent TCP flows to the target; no race against uncontrollable victim state is required beyond normal multi-stream traffic patterns.
PR:N - Exploitation requires only the ability to send network packets to the host; no local account, capabilities, or authentication on the victim is needed. Header-split being enabled is victim configuration, not attacker privilege.
UI:N - No victim user action is required during exploitation beyond the host already receiving network traffic on its GVE interface; the attacker does not depend on the user mounting filesystems or opening files.
S:U - Impact is confined to the guest kernel network stack and driver DMA header buffers on the affected VM; it does not cross a VM/host or IOMMU security boundary to affect the hypervisor or other tenants.
C:H - Out-of-order completions cause the driver to read the wrong header slot, mixing headers between packets/flows and disclosing other connections' L3/L4 header bytes; premature header-buffer reuse also corrupts DMA data the driver later copies into skbs.
I:H - The driver can repost and overwrite header DMA buffers while the device is still writing them, corrupting packet headers fed into the stack; wrong headers paired with payloads can break protocol parsing and constitutes exploitable kernel memory corruption.
A:H - The bug causes severe TCP throughput collapse, massive retransmissions, and dropped/corrupted packets; header-buffer corruption and malformed skbs can also destabilize the kernel RX path and cause oopses or loss of network availability on the host.
CVSS 3.1