{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-99686",
  "modified": "2026-11-23T05:30:01Z",
  "upstream": [
    "CVE-2026-99686"
  ],
  "published": "2026-11-20T05:52:17Z",
  "summary": "vhost: fix used ring index wrap in vhost_add_used_n_in_order",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nvhost: fix used ring index wrap in vhost_add_used_n_in_order\n\nvhost_add_used_n_in_order() advances start by nheads[i] but wraps it\nwith a single subtraction.  If start + nheads[i] >= 2 * vq->num, start\ncan remain outside the ring.\n\nWith used-ring logging enabled, start > vq->num makes (vq->num - start)\nunderflow.  log_write() then sets bits beyond the dirty-log bitmap,\npotentially corrupting adjacent userspace memory.  This is reachable on\nthe vhost-net TX path with VIRTIO_F_IN_ORDER: done_idx can reach\nVHOST_NET_BATCH (64), triggering the issue with a 32-entry ring.\n\nWrap start with a mask to keep it within the ring.  VHOST_SET_VRING_NUM\nenforces a nonzero power-of-two ring size, allowing start to be wrapped\nusing & (vq->num - 1).",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:13",
        "name": "linux"
      },
      "versions": [
        "1:6.18.29-1+rpt1",
        "1:6.18.33-1+rpt1",
        "1:6.18.34-1+rpt1",
        "1:6.18.39-1+rpt1",
        "1:6.18.50-1+rpt1",
        "1:6.18.60-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-2712",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v8",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-2712",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v8",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-2712",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v8",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-2712",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v8",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.50+rpt-rpi-2712",
            "binary_version": "1:6.18.50-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.50+rpt-rpi-v8",
            "binary_version": "1:6.18.50-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.50+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.50-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.60+rpt-rpi-2712",
            "binary_version": "1:6.18.60-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.60+rpt-rpi-v8",
            "binary_version": "1:6.18.60-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.60+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.60-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.18.29-1+rpt1": {
            "linux_commit": "66318c5b5cd8145a662303af12ed39ac07eb27cc",
            "upstream_version": "6.18.29",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.64"
          },
          "1:6.18.33-1+rpt1": {
            "linux_commit": "95b85bebbedcaedfa7ca79116ed38b7376fba412",
            "upstream_version": "6.18.33",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.64"
          },
          "1:6.18.34-1+rpt1": {
            "linux_commit": "c8c7494100e99ee05b11aaa4f0588a223a63d1af",
            "upstream_version": "6.18.34",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.64"
          },
          "1:6.18.39-1+rpt1": {
            "linux_commit": "60ea684a8ace97bb0db1a16e20753bdd6ab371ff",
            "upstream_version": "6.18.39",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.64"
          },
          "1:6.18.50-1+rpt1": {
            "linux_commit": "cff533aec2fa601846766b32ff57204e0a61bed7",
            "upstream_version": "6.18.50",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.64"
          },
          "1:6.18.60-1+rpt1": {
            "linux_commit": "0b41724521c9adf5399409d02aece6c1df0a4432",
            "upstream_version": "6.18.60",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.64"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-99686"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ebdc350cfb1740b6411420482e58a35cc4761628"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/308e148cf771ed36ad8cd7ef0e9bee2f7ec478d0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e244725e86be02cd85cb878b3ed8570eba2e4be1"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-11-22T11:18:26Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - Guest TX descriptors reach vhost_add_used_n_in_order through handle_tx_kick, handle_tx_copy, and vhost_tx_batch, which stores done_idx in vq->nheads[0] and calls vhost_net_signal_used with count 1. That batch count is what wraps start; a remote peer never supplies nheads or the used-ring index.\nAC:H - The guest can accept VIRTIO_F_IN_ORDER, select a 32-entry queue that QEMU programs with VHOST_SET_VRING_NUM, and kick a 64-buffer TX batch so one subtraction leaves start above vq->num. log_write runs only if vq->log_used is set, and only host userspace sets VHOST_VRING_F_LOG on VHOST_SET_VRING_ADDR; the guest cannot.\nPR:L - The guest does not pass vhost_dev_check_owner or open /dev/vhost-net. QEMU owns the device and issues the ioctls; the guest only publishes the TX avail ring and kicks it. That is control of a tenant VM's virtio-net queue, not host root in the init namespace.\nUI:N - The guest posts the TX buffers and fires the kick eventfd that wakes handle_tx_kick. No host user has to mount media or open an attacker-supplied file; used-ring logging is host state, not a victim action on attacker data.\nS:C - vhost_put_used writes one in-range used element before start advances, so the guest used ring is not the overflow. With vq->log_used, log_used feeds the underflow length to log_write and set_bit_to_user, which sets bits past the host dirty-log bitmap in the QEMU process.\nC:H - For num=32 and start left at 35, (vq->num - start) is an unsigned underflow and log_write is called with length 34359738344. set_bit_to_user then walks vq->log_base past the bitmap, a VMM heap smash that can disclose host memory held by QEMU rather than a few used-ring bytes.\nI:H - The same log_write loop is an out-of-bounds write: set_bit_to_user sets every bit from the used-ring log page onward until pin_user_pages_fast fails, turning adjacent QEMU heap bytes into 0xFF. That is host-process corruption, not an in-bounds used-ring update.\nA:H - The multi-gigabyte log_write loop runs inside the vhost worker on the TX kick path and ignores log_used's error, so it both stalls the virtqueue and smashes the QEMU address space that owns the vhost mm until the VMM crashes and the VM is gone."
    }
  }
}
