Skip to contentSkip to conversation

Xen Security Advisory 510 v3 (CVE-2026-79602) - x86: improper handling of HVM emulation return codes

PATCH Xen.org security team 1 participant 1 message Sep 8

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Xen Security Advisory CVE-2026-79602 / XSA-510
version 3

x86: improper handling of HVM emulation return codes

UPDATES IN VERSION 3
====================

Public release.

ISSUE DESCRIPTION
=================

A guest with a PCI device assigned that has at least a BAR on the IO port space can trigger a BUG() in Xen.

IMPACT
======

Passing through a PCI device with at least one BAR in IO address space to unprivileged HVM guests can result in a Denial of Service (DoS) affecting the entire host.

VULNERABLE SYSTEMS
==================

Xen versions 4.6 and later are vulnerable. This is known to be the case with the fix for XSA-491, but it's possible the issue can also be triggered from other, non-analyzed paths.

Only x86 systems are vulnerable. Arm systems are not vulnerable.

Only HVM guests with a PCI device with IO BARs assigned can leverage the vulnerability.

MITIGATION
==========

There is no mitigation available.

CREDITS
=======

This issue was discovered by Jiqian Chen of AMD and diagnosed as a security issue by Roger Pau Monné of AMD.

RESOLUTION
==========

Applying the attached patch resolves this issue.

Note that patches for released versions are generally prepared to apply to the stable branches, and may not apply cleanly to the most recent release tarball. Downstreams are encouraged to update to the tip of the stable branch before applying these patches.

xsa510.patch xen-unstable - Xen 4.17.x

$ sha256sum xsa510*
915cca4f0e6af998683a3551e5913d2489b23a697d5eab11358d4d8ffe0a0e55  xsa510.patch
$

DEPLOYMENT DURING EMBARGO
=========================

Deployment of the patches and/or mitigations described above (or others which are substantially similar) is permitted during the embargo, even on public-facing systems with untrusted guest users and administrators.

But: Distribution of updated software is prohibited (except to other members of the predisclosure list).

Predisclosure list members who wish to deploy significantly different patches and/or mitigations, please contact the Xen Project Security Team.

(Note: this during-embargo deployment notice is retained in post-embargo publicly released Xen Project advisories, even though it is then no longer applicable. This is to enable the community to have oversight of the Xen Project Security Team's decisionmaking.)

For more information about permissible uses of embargoed information, consult the Xen Project community's agreed Security Policy:
http://www.xenproject.org/security-policy.html
-----BEGIN PGP SIGNATURE-----

iQFABAEBCAAqFiEEI+MiLBRfRHX6gGCng/4UyVfoK9kFAmqf98UMHHBncEB4ZW4u b3JnAAoJEIP+FMlX6CvZ3GEIALHxkeOzpl3/ctf8o9R89LFTfayDXMY6xGbUTsRk oiLIoKkYkZJPtiG6cY8YGRvzm/UYr+KpeMBsNtm0EcbZlPClGjkEc7JSSpMvcVps XTzRkIUhyOTfpKklhDQJynIIpMu8NkJBLvyVYDcY8fpeZ7yDykMkQ4RyvXT5A56r Vn18FJ401QqBO0+NTD0aCcasiLFpfrsh3AhPfKLIi7c3q0tIayyNBS8NBSNss+TF OJew3jWX7bWnAUlPl4b8EMm4gwK/7o6YJYW+NMCTNMJ/UdfvOJkkq9T8l/41FIXq ArtZrFpKWxsitNoXG7pJIyH/C5wBH2DFABzfqgNjkpzfqKw=
=sVA/
-----END PGP SIGNATURE-----

From 796537311797d600c0c716d0c015531fc41abb92 Mon Sep 17 00:00:00 2001
From: Roger Pau Monne <[email protected]>
Date: Fri, 7 Aug 2026 11:03:48 +0200
Subject: [PATCH] x86/emul: cope with internal handlers returning X86EMUL_RETRY
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

hvm_io_intercept() can return X86EMUL_RETRY, and as such it needs to be handled in the switch in hvmemul_do_io() to avoid triggering the BUG() from the default case.

Reset the vCPU state to no in-flight IOREQ and return X86EMUL_RETRY so that the access is retried.

This is XSA-510 / CVE-2026-79602.

---
 xen/arch/x86/hvm/emulate.c | 1 +
 1 file changed, 1 insertion(+)
xen/arch/x86/hvm/emulate.c +1 -0
index 2efb1d4f0823..c09ea002ec62 100644
@@ -308,6 +308,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
Signature · 1 line
2.53.0