CVE-2021-28697

7.8 HIGH

📋 TL;DR

This Xen hypervisor vulnerability allows guest virtual machines to retain access to freed memory pages after switching from grant table v2 to v1. A race condition during mapping requests can cause pages to remain mapped in multiple locations, potentially exposing sensitive data or enabling privilege escalation. Affects systems running Xen with grant table v2 enabled.

💻 Affected Systems

Products:
  • Xen Hypervisor
Versions: All versions supporting grant table v2 (Xen 4.2 through 4.15)
Operating Systems: Linux distributions with Xen packages, Other OSes using Xen
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when grant table v2 is enabled and guests switch between v1 and v2 modes. Default configurations may not be vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Guest VM gains unauthorized access to sensitive hypervisor memory, potentially leading to full hypervisor compromise, data exfiltration, or escape to host system.

🟠

Likely Case

Guest VM reads previously freed memory containing sensitive data from other guests or hypervisor, potentially enabling information disclosure attacks.

🟢

If Mitigated

With proper isolation and monitoring, impact limited to information disclosure within the affected guest's security context.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: HIGH

Exploitation requires guest VM access and ability to trigger grant table mode switching. Race condition makes reliable exploitation challenging.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Xen 4.15.1 and later, backported to earlier versions

Vendor Advisory: https://xenbits.xen.org/xsa/advisory-378.html

Restart Required: Yes

Instructions:

1. Update Xen hypervisor to patched version. 2. Reboot all affected systems. 3. Verify no guests are using vulnerable grant table configurations.

🔧 Temporary Workarounds

Disable grant table v2

linux

Prevent guests from using grant table v2 to avoid the vulnerability

xl set-parameters <domain-id> grant-table-version=1

🧯 If You Can't Patch

  • Isolate affected Xen hosts from sensitive networks
  • Monitor for unusual guest behavior or memory access patterns

🔍 How to Verify

Check if Vulnerable:

Check Xen version with 'xl info' or 'xm info' and verify if grant table v2 is enabled for any domains

Check Version:

xl info | grep xen_version

Verify Fix Applied:

Verify Xen version is 4.15.1+ or has XSA-378 patches applied, and no guests are using grant table v2

📡 Detection & Monitoring

Log Indicators:

  • Xen hypervisor logs showing grant table mode switching
  • Unexpected memory access patterns in guest VMs

Network Indicators:

  • Unusual outbound traffic from Xen hosts

SIEM Query:

source="xen" AND ("grant table" OR "XSA-378")

🔗 References

📤 Share & Export