From ecbfebd5f8be49158abc315feeaed2a6ad81b098 Mon Sep 17 00:00:00 2001 From: Fernando Rodrigues Date: Fri, 24 Oct 2025 23:27:04 +1100 Subject: [PATCH] xen: patch with XSA-476 Xen Security Advisory CVE-2025-58149 / XSA-476 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. Signed-off-by: Fernando Rodrigues --- pkgs/by-name/xe/xen/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/xe/xen/package.nix b/pkgs/by-name/xe/xen/package.nix index e5910918c62f..e8645badd14d 100644 --- a/pkgs/by-name/xe/xen/package.nix +++ b/pkgs/by-name/xe/xen/package.nix @@ -225,6 +225,12 @@ stdenv.mkDerivation (finalAttrs: { url = "https://xenbits.xen.org/xsa/xsa475-2.patch"; hash = "sha256-7MKtDAJpihpfcBK+hyBFGCP6gHWs2cdgTks8B439b2s="; }) + + # XSA 476 + (fetchpatch { + url = "https://xenbits.xen.org/xsa/xsa476-4.20.patch"; + hash = "sha256-nZUHcMr9RpQqrazG+RtTw+/s1gzqN1D565RuQjuALTQ="; + }) ]; outputs = [