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

Incorrect removal of permissions on PCI device unplug

When passing through PCI devices, the detach logic in libxl won't remove

access permissions to any 64bit memory BARs the device might have. As a

result a domain can still have access any 64bit memory BAR when such

device is no longer assigned to the domain.

For PV domains the permission leak allows the domain itself to map the memory

in the page-tables. For HVM it would require a compromised device model or

stubdomain to map the leaked memory into the HVM domain p2m.

Affected products

Xen

Xen

consult Xen advisory XSA-476 - UNKNOWN

References

GitHub Security Advisories

GHSA-38qg-7h9q-7h29

When passing through PCI devices, the detach logic in libxl won't remove access permissions to...

https://github.com/advisories/GHSA-38qg-7h9q-7h29

When passing through PCI devices, the detach logic in libxl won't remove access permissions to any 64bit memory BARs the device might have. As a result a domain can still have access any 64bit memory BAR when such device is no longer assigned to the domain.

For PV domains the permission leak allows the domain itself to map the memory in the page-tables. For HVM it would require a compromised device model or stubdomain to map the leaked memory into the HVM domain p2m.

JSON source

Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2025-58149",
    "assignerOrgId": "23aa2041-22e1-471f-9209-9b7396fa234f",
    "assignerShortName": "XEN",
    "dateUpdated": "2025-10-31T17:47:51.252Z",
    "dateReserved": "2025-08-26T06:48:41.443Z",
    "datePublished": "2025-10-31T11:50:39.536Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "23aa2041-22e1-471f-9209-9b7396fa234f",
        "shortName": "XEN",
        "dateUpdated": "2025-10-31T11:50:39.536Z"
      },
      "datePublic": "2025-10-24T12:13:00.000Z",
      "title": "Incorrect removal of permissions on PCI device unplug",
      "descriptions": [
        {
          "lang": "en",
          "value": "When passing through PCI devices, the detach logic in libxl won't remove\naccess permissions to any 64bit memory BARs the device might have.  As a\nresult a domain can still have access any 64bit memory BAR when such\ndevice is no longer assigned to the domain.\n\nFor PV domains the permission leak allows the domain itself to map the memory\nin the page-tables.  For HVM it would require a compromised device model or\nstubdomain to map the leaked memory into the HVM domain p2m."
        }
      ],
      "affected": [
        {
          "vendor": "Xen",
          "product": "Xen",
          "defaultStatus": "unknown",
          "versions": [
            {
              "version": "consult Xen advisory XSA-476",
              "status": "unknown"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://xenbits.xenproject.org/xsa/advisory-476.html"
        }
      ],
      "impacts": [
        {
          "descriptions": [
            {
              "lang": "en",
              "value": "A buggy or malicious PV guest can access memory of PCI devices no longer\nassigned to it."
            }
          ]
        }
      ],
      "configurations": [
        {
          "lang": "en",
          "value": "Xen versions 4.0 and newer are vulnerable.\n\nOnly PV guests with PCI passthrough devices can leverage the vulnerability.\n\nOnly domains whose PCI devices are managed by the libxl library are affected.\nThis includes the xl toolstack and xapi, which uses the xl toolstack when\ndealing with PCI devices.\n\nHVM guests are also affected, but accessing the leaked memory requires an\nadditional compromised component on the system."
        }
      ],
      "workarounds": [
        {
          "lang": "en",
          "value": "Not doing hot unplug of PCI devices will avoid the vulnerability.\n\nPassing through PCI devices to HVM domains only will also limit the impact, as\nan attacker would require another compromised component to exploit it."
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "This issue was discovered by Jiqian Chen of AMD and diagnosed as a\nsecurity issue by Roger Pau Monné of XenServer.",
          "type": "finder"
        }
      ]
    },
    "adp": [
      {
        "providerMetadata": {
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP",
          "dateUpdated": "2025-10-31T17:47:51.252Z"
        },
        "title": "CISA ADP Vulnrichment",
        "problemTypes": [
          {
            "descriptions": [
              {
                "lang": "en",
                "description": "CWE-284 Improper Access Control",
                "cweId": "CWE-284",
                "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-58149