CVE-2026-99544 PUBLISHED

Drivers: hv: vmbus: Bounds check the shared ring buffer indices

Assigner: Linux
Reserved: 25.09.2026 Published: 19.11.2026 Updated: 22.11.2026

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

Drivers: hv: vmbus: Bounds check the shared ring buffer indices

In a CoCo VM the host is untrusted. Since the VMBus ring buffer read and write indices live in shared memory, the guest has to treat both as potentially malicious.

hv_ringbuffer_write() copies into the ring at write_index with no bounds checking, so the host can make the guest write packet data at any offset up to 4 GiB past the start of the ring buffer. read_index matters too: the available space derived from both indices is the only bound on how much is copied, and an out-of-range index can make it far larger than the ring.

The fix is to validate both indices before use and to use the validated snapshot instead of re-accessing. For invalid indices, hv_ringbuffer_write() logs and returns -EIO.

One re-read of write_index is left unchecked in this patch: hv_get_ring_bufferindices() fetches it again for the prev_indices trailer. The value is only returned to the host and is not used as an offset or length for indexing. Since this is not a security issue, it is addressed later in the series.

Open-coding the bytes available arithmetic keeps the fix free of prerequisites; a later patch refactors it into a helper function.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS Score: 9.3

AV:L - The Hyper-V host writes hv_ring_buffer.read_index and write_index in the decrypted ring-header page that __vmbus_establish_gpadl() shares for a non-confidential channel. hv_ringbuffer_write() uses that write_index as the memcpy offset when heartbeat_onchannelcallback() replies through vmbus_sendpacket(). AC:L - The host offers the heartbeat channel without VMBUS_CHANNEL_CONFIDENTIAL_RING_BUFFER so the ring stays shared, then sets both indices so hv_get_bytes_to_write() wraps past the size check. heartbeat_onchannelcallback() answers the host's own packet via vmbus_sendpacket(), so the copy is under the host's control. PR:N - The host writes the shared outbound ring header from outside the guest and presents no guest credential. vmbus_onoffer() accepts the heartbeat device because allowed_in_isolated is set, and the reply runs in kernel context. UI:N - The host posts the inbound heartbeat and poisons the outbound indices itself. heartbeat_onchannelcallback() sends the reply from the guest kernel as part of handling that packet. S:C - hv_copyto_ringbuffer() memcpy's at the ring data pointer plus the host-chosen write_index, past the double-mapped vmap, so bytes that should stay in the host-shared ring land in other guest kernel memory across the CoCo private boundary. C:H - The echoed hbeat_txf_buf, whose bytes the host chose and whose length is recvlen up to one page, is written at a host-chosen u32 offset. That corrupts guest pointers later VMBus replies use to copy private memory into the shared ring. I:H - hv_copyto_ringbuffer() memcpy's the outbound packet at write_index with no upper bound against ring_datasize, a host-chosen offset up to 4GiB past the ring, using bytes from the host-supplied heartbeat buffer. A:H - The memcpy in hv_copyto_ringbuffer() runs while hv_ringbuffer_write() holds outring_info->ring_lock with IRQs disabled, so a write_index on the vmap guard page or an unmapped hole faults and oopses the guest.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 3e7ee4902fe6996048f03433dd111426db3cfa92 to cdb9126a79b608b4331dfdc03beb05be8d2563be (excl.)
  • affected from 3e7ee4902fe6996048f03433dd111426db3cfa92 to f204bb7c5d10482067e095af567c391bc88ecb44 (excl.)
  • affected from 3e7ee4902fe6996048f03433dd111426db3cfa92 to 1611ce4dc6cbace75f27db6a559af8d391a06118 (excl.)
  • affected from 3e7ee4902fe6996048f03433dd111426db3cfa92 to 1d287c17cc5bfd6386fe0770999be410b248d021 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 2.6.32 is affected
  • unaffected from 0 to 2.6.32 (excl.)
  • unaffected from 6.12.117 to 6.12.* (incl.)
  • unaffected from 6.18.61 to 6.18.* (incl.)
  • unaffected from 7.3.2 to 7.3.* (incl.)
  • unaffected from 7.4-rc1 to * (incl.)

References