{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-99785",
  "modified": "2026-11-24T05:30:02Z",
  "upstream": [
    "CVE-2026-99785"
  ],
  "published": "2026-11-20T05:52:17Z",
  "summary": "9p/trans_virtio: reject mount tags longer than NAME_MAX at probe",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\n9p/trans_virtio: reject mount tags longer than NAME_MAX at probe\n\np9_virtio_probe() reads a 16-bit mount tag length (tag_len) from the\ndevice config and kzalloc()s tag_len + 1 bytes for chan->tag with no\nupper bound. A malicious or compromised host can present a tag of up to\n65535 bytes; that tag is later copied into the single-page sysfs buffer\nby p9_mount_tag_show() (memcpy(buf, chan->tag, tag_len + 1)), a\nhost-controlled out-of-bounds write of up to ~64 KiB past the PAGE_SIZE\nattribute buffer.\n\nReject an overlong tag at probe time. A 9p mount tag is a name-like\nidentifier, so bound it by NAME_MAX (255): that limit is independent of\nthe sysfs/seq_file page size and is far above any legitimate mount tag,\nwhich keeps p9_mount_tag_show() safe at the root without hard-coding a\nseq_file implementation detail.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.193",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-99785"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6801a2dbe6014fb12ac32ab8f93f271d911cbfef"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/493ac68dbb533b8be6c938376b3d80c0bf819884"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/a5eddf875437a313a9229415d8fe8caa39a65481"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/42eef160f82496e416597cf9ef8c686545286d12"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/1b8a525573d15370d441c8a25fd27161f1d084c2"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/030cebd51fcfa46eeb916a599fee447c9d3d1170"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b8779990399009d73f8d039a149c398a9b879839"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5bfef2b6dafe83fe2d8d210d54093a8f48cfc97e"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-11-23T08:12:11Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - p9_virtio_probe(), reached from virtio_dev_probe() after virtio_pci_probe() or virtio_mmio_probe(), copies tag_len and the tag from virtio device config with virtio_cread() and virtio_cread_bytes(); those bytes are not a 9P message from a remote peer.\nAC:L - The host presents a legacy virtio-pci device so virtio_pci_probe() falls through on modern -ENODEV, or a virtio-mmio device, with a config region large enough for the tag; legacy vp_get() and vm_get() do not cap the read, so p9_virtio_probe() stores it every time.\nPR:N - The device backend supplies struct virtio_9p_config.tag_len in p9_virtio_probe() with no credential check, and the resulting mount_tag attribute is created mode 0444; no guest capability or login is required.\nUI:R - The out-of-bounds memcpy is in p9_mount_tag_show(), invoked only when userspace reads mount_tag (seq_read_iter to sysfs_kf_seq_show to dev_attr_show); the KOBJ_CHANGE uevent from p9_virtio_probe() does not read that file.\nS:U - The corrupted object is the guest kernel seq_file buffer filled by p9_mount_tag_show(); the fault stays in that kernel and is not a guest-to-host or IOMMU boundary crossing.\nC:H - p9_mount_tag_show() memcpy()s strlen(chan->tag)+1 host-chosen bytes into the PAGE_SIZE buffer seq_read_iter allocated with seq_buf_alloc(), so a tag_len above PAGE_SIZE overruns the heap object and can leak adjacent kernel memory.\nI:H - That memcpy writes the device-supplied tag, up to 65535 bytes from virtio_cread_bytes(), past the seq_file page; the host chooses both the length and the bytes, which is a controlled kernel heap write.\nA:H - p9_mount_tag_show() memcpy()s past the PAGE_SIZE seq_file buffer from seq_buf_alloc(); that fault runs in the read syscall's kernel context and oopses the guest."
    }
  }
}
