2025-10-31 11:50CVE-2025-58147XEN
PUBLISHED5.2

x86: Incorrect input sanitisation in Viridian hypercalls

[This CNA information record relates to multiple CVEs; the

text explains which aspects/vulnerabilities correspond to which CVE.]

Some Viridian hypercalls can specify a mask of vCPU IDs as an input, in

one of three formats. Xen has boundary checking bugs with all three

formats, which can cause out-of-bounds reads and writes while processing

the inputs.

* CVE-2025-58147. Hypercalls using the HV_VP_SET Sparse format can

cause vpmask_set() to write out of bounds when converting the bitmap

to Xen's format.

* CVE-2025-58148. Hypercalls using any input format can cause

send_ipi() to read d->vcpu[] out-of-bounds, and operate on a wild

vCPU pointer.

Affected products

Xen

Xen

consult Xen advisory XSA-475 - UNKNOWN

References

GitHub Security Advisories

GHSA-64c5-3xxf-ccjp

[This CNA information record relates to multiple CVEs; the text explains which aspects...

https://github.com/advisories/GHSA-64c5-3xxf-ccjp

[This CNA information record relates to multiple CVEs; the text explains which aspects/vulnerabilities correspond to which CVE.]

Some Viridian hypercalls can specify a mask of vCPU IDs as an input, in one of three formats. Xen has boundary checking bugs with all three formats, which can cause out-of-bounds reads and writes while processing the inputs.

  • CVE-2025-58147. Hypercalls using the HV_VP_SET Sparse format can cause vpmask_set() to write out of bounds when converting the bitmap to Xen's format.

  • CVE-2025-58148. Hypercalls using any input format can cause send_ipi() to read d->vcpu[] out-of-bounds, and operate on a wild vCPU pointer.

JSON source

Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2025-58147",
    "assignerOrgId": "23aa2041-22e1-471f-9209-9b7396fa234f",
    "assignerShortName": "XEN",
    "dateUpdated": "2025-10-31T17:45:58.124Z",
    "dateReserved": "2025-08-26T06:48:41.443Z",
    "datePublished": "2025-10-31T11:50:28.282Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "23aa2041-22e1-471f-9209-9b7396fa234f",
        "shortName": "XEN",
        "dateUpdated": "2025-10-31T11:50:28.282Z"
      },
      "datePublic": "2025-10-21T11:59:00.000Z",
      "title": "x86: Incorrect input sanitisation in Viridian hypercalls",
      "descriptions": [
        {
          "lang": "en",
          "value": "[This CNA information record relates to multiple CVEs; the\ntext explains which aspects/vulnerabilities correspond to which CVE.]\n\nSome Viridian hypercalls can specify a mask of vCPU IDs as an input, in\none of three formats.  Xen has boundary checking bugs with all three\nformats, which can cause out-of-bounds reads and writes while processing\nthe inputs.\n\n * CVE-2025-58147.  Hypercalls using the HV_VP_SET Sparse format can\n   cause vpmask_set() to write out of bounds when converting the bitmap\n   to Xen's format.\n\n * CVE-2025-58148.  Hypercalls using any input format can cause\n   send_ipi() to read d->vcpu[] out-of-bounds, and operate on a wild\n   vCPU pointer."
        }
      ],
      "affected": [
        {
          "vendor": "Xen",
          "product": "Xen",
          "defaultStatus": "unknown",
          "versions": [
            {
              "version": "consult Xen advisory XSA-475",
              "status": "unknown"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://xenbits.xenproject.org/xsa/advisory-475.html"
        }
      ],
      "impacts": [
        {
          "descriptions": [
            {
              "lang": "en",
              "value": "A buggy or malicious guest can cause Denial of Service (DoS) affecting\nthe entire host, information leaks, or elevation of privilege."
            }
          ]
        }
      ],
      "configurations": [
        {
          "lang": "en",
          "value": "Xen versions 4.15 and newer are vulnerable.  Versions 4.14 and older are\nnot vulnerable.\n\nOnly x86 HVM guests which have Viridian enabled can leverage the\nvulnerability.\n\nWith the `xl` toolstack, this means any `viridian=` setting in the VM's\nconfiguration file.\n\nNote - despite:\n\n  `viridian=[\"!hcall_remote_tlb_flush\", \"!hcall_ipi\", \"!ex_processor_masks\"]`\n\nbeing documented to turns off the relevant functionality, this\nconfiguration does not block the relevant hypercalls."
        }
      ],
      "workarounds": [
        {
          "lang": "en",
          "value": "Not enabling Viridian will avoid the issuse."
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "This issue was discovered by Teddy Astie of Vates",
          "type": "finder"
        }
      ]
    },
    "adp": [
      {
        "providerMetadata": {
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP",
          "dateUpdated": "2025-10-31T17:45:58.124Z"
        },
        "title": "CISA ADP Vulnrichment",
        "problemTypes": [
          {
            "descriptions": [
              {
                "lang": "en",
                "description": "CWE-125 Out-of-bounds Read",
                "cweId": "CWE-125",
                "type": "CWE"
              }
            ]
          }
        ],
        "metrics": [
          {
            "cvssV3_1": {
              "version": "3.1",
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
              "attackVector": "NETWORK",
              "attackComplexity": "LOW",
              "privilegesRequired": "NONE",
              "userInteraction": "NONE",
              "scope": "UNCHANGED",
              "confidentialityImpact": "HIGH",
              "integrityImpact": "NONE",
              "availabilityImpact": "NONE",
              "baseScore": 7.5,
              "baseSeverity": "HIGH"
            }
          },
          {}
        ]
      }
    ]
  }
}

Mitre source

https://cveawg.mitre.org/api/cve/CVE-2025-58147