CVE-2026-31787

xen/privcmd: fix double free via VMA splitting

No CVSS score yet EPSS 0.19%

Published 30 Apr 2026 Updated 6 Nov 2026 CNA: Linux

Check your servers for CVE-2026-31787

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-31787 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

xen/privcmd: fix double free via VMA splitting

privcmd_vm_ops defines .close (privcmd_close), but neither .may_split nor .open. When userspace does a partial munmap() on a privcmd mapping, the kernel splits the VMA via __split_vma(). Since may_split is NULL, the split is allowed. vm_area_dup() copies vm_private_data (a pages array allocated in alloc_empty_pages()) into the new VMA without any fixup, because there is no .open callback.

Both VMAs now point to the same pages array. When the unmapped portion is closed, privcmd_close() calls: - xen_unmap_domain_gfn_range() - xen_free_unpopulated_pages() - kvfree(pages)

The surviving VMA still holds the dangling pointer. When it is later destroyed, the same sequence runs again, which leads to a double free.

Fix this issue by adding a .may_split callback denying the VMA split.

This is XSA-487 / CVE-2026-31787

Exploitation

EPSS 0.19%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 8.66% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 6 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from d71f513985c22f1050295d1a7e4327cf9fb060da, before dbf862ce9f009128ab86b234d91413a3e450beb4
affected from d71f513985c22f1050295d1a7e4327cf9fb060da, before 2b985d3a024b9e8c24e21671b34e855569763808
affected from d71f513985c22f1050295d1a7e4327cf9fb060da, before 1576ff3869cbd3620717195f971c85b7d7fd62b5
affected from d71f513985c22f1050295d1a7e4327cf9fb060da, before 402d84ad9e89bd4cbfd07ca8598532b7021daf95
affected from d71f513985c22f1050295d1a7e4327cf9fb060da, before 2894a351fe2ea8684919d36df3188b9a35e3926f
affected from d71f513985c22f1050295d1a7e4327cf9fb060da, before 446ee446d9ae66f36e95c3c90bbcc4e56b94cde0
affected from d71f513985c22f1050295d1a7e4327cf9fb060da, before 71bf829800758a6e3889096e4754ef47ba7fc850
affected from d71f513985c22f1050295d1a7e4327cf9fb060da, before 24daca4fc07f3ff8cd0e3f629cd982187f48436a
Other versions: unaffected
Linux
affected 3.8
unaffected before 3.8
unaffected from 5.10.254 up to and including 5.10.*
unaffected from 5.15.204 up to and including 5.15.*
unaffected from 6.1.170 up to and including 6.1.*
unaffected from 6.6.137 up to and including 6.6.*
unaffected from 6.12.85 up to and including 6.12.*
unaffected from 6.18.26 up to and including 6.18.*
unaffected from 7.0.3 up to and including 7.0.*
unaffected 7.1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-31787 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31787

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-31787
trivy image --scanners vuln IMAGE | grep CVE-2026-31787

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-31787 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.