From 96d850eec3dd82eb955f0da6711dfd389faed916 Mon Sep 17 00:00:00 2001 From: Fernando Rodrigues Date: Thu, 4 Jun 2026 14:29:42 +1000 Subject: [PATCH] xen: patch with XSA-494 Xen Security Advisory CVE-2026-42488 / XSA-494 version 3 x86: mismatched mapcache metadata Some shadow paging errors paths will switch the page-tables without updating the currently running vCPU reference. This causes a mismatch between the loaded page-tables and the mapcache metadata which can lead to corruption of the mapcache. Privilege escalation, Denial of Service (DoS) affecting the entire host, and information leaks. https://xenbits.xen.org/xsa/advisory-494.html Signed-off-by: Fernando Rodrigues (cherry picked from commit c8ec62ac39407e46ff9c97a28983455dce1837ad) --- 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 7dff5b98e7a7..ed25d4d3e2df 100644 --- a/pkgs/by-name/xe/xen/package.nix +++ b/pkgs/by-name/xe/xen/package.nix @@ -318,6 +318,12 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-6pGjjPjalw6TY0n9TInE3nCXNmt6BUxwy1r1xf55U7k="; }) + # XSA #494 + (fetchpatch { + url = "https://xenbits.xenproject.org/xsa/xsa494-4.20.patch"; + hash = "sha256-ns0s++J2adUD/HWuMiYad/g3MITs+twlMnkpFnP7T0w="; + }) + # patch `libxl` to search for `qemu-system-i386` properly. (Before 4.21) (fetchpatch { url = "https://github.com/xen-project/xen/commit/f6281291704aa356489f4bd927cc7348a920bd01.diff?full_index=1";