Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
High

Double free in Linux kernel Xen privcmd via VMA splitting

IdentifiersCVE-2026-31787CWE-415· Double Free

CVE-2026-31787 is a double-free vulnerability in the Linux kernel Xen privcmd driver. The flaw arises because privcmd_vm_ops defines a .close handler (privcmd_close) but does not define .may_split or .open. When userspace performs a partial munmap() on a privcmd mapping, the kernel may split the VMA via __split_vma(). Because .may_split is absent, the split is permitted, and vm_area_dup() duplicates vm_private_data into the new VMA without reinitialization or reference management. As a result, both VMAs reference the same pages array originally allocated by alloc_empty_pages(). When one VMA is closed, privcmd_close() invokes xen_unmap_domain_gfn_range(), xen_free_unpopulated_pages(), and kvfree(pages). The remaining VMA retains a dangling pointer, and when it is later destroyed, the same cleanup path executes again, causing a double free of kernel memory. Xen tracks this as XSA-487.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows a root user in an affected Linux Xen guest to trigger a double free in kernel memory. According to the Xen advisory, the security-relevant consequence is circumvention of Linux kernel lockdown protections associated with secure boot, enabling kernel actions that should be blocked in secure mode. Additional impact may include kernel instability or crash due to the double free. Xen assessed general crash potential as not security-relevant because exploitation requires root privileges.

Mitigation

If you can’t patch tonight, do this now.

No mitigation is currently available short of patching, according to the Xen advisory. Reduce exposure by updating affected Linux guest kernels promptly. Where operationally feasible, restrict or avoid granting root access inside affected Xen Linux guests until patched.

Remediation

Patch, then assume compromise.

Apply the Linux kernel fix for XSA-487 / CVE-2026-31787. The upstream remediation is to add a .may_split callback to the Xen privcmd VMA operations so VMA splitting is denied for these mappings, preventing duplicated vm_private_data ownership across split VMAs. Xen also states that applying the provided xsa487-linux.patch to affected guest kernels resolves the issue.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
LinuxLinux Kerneloperating_system
Rocky LinuxKerneloperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity5

Community discussion across Reddit, Mastodon, and other social sources.