# CVE-2026-31787: xen/privcmd: fix double free via VMA splitting

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.20% (percentile 6, 2026-11-28)
- **CWE:** CWE-415
- **Published:** 2026-04-30T10:31:28.992Z
- **Modified:** 2026-11-11T21:10:00.200Z

## Who should check

- Anyone running Linux \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< dbf862ce9f009128ab86b234d91413a3e450beb4; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 2b985d3a024b9e8c24e21671b34e855569763808; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 1576ff3869cbd3620717195f971c85b7d7fd62b5; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 402d84ad9e89bd4cbfd07ca8598532b7021daf95; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 2894a351fe2ea8684919d36df3188b9a35e3926f; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 446ee446d9ae66f36e95c3c90bbcc4e56b94cde0; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 71bf829800758a6e3889096e4754ef47ba7fc850; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 24daca4fc07f3ff8cd0e3f629cd982187f48436a
- Anyone running Linux 3.8

## 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

## Affected and fixed versions

- Linux: \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< dbf862ce9f009128ab86b234d91413a3e450beb4; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 2b985d3a024b9e8c24e21671b34e855569763808; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 1576ff3869cbd3620717195f971c85b7d7fd62b5; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 402d84ad9e89bd4cbfd07ca8598532b7021daf95; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 2894a351fe2ea8684919d36df3188b9a35e3926f; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 446ee446d9ae66f36e95c3c90bbcc4e56b94cde0; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 71bf829800758a6e3889096e4754ef47ba7fc850; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 24daca4fc07f3ff8cd0e3f629cd982187f48436a (cvelist)
- Linux: 3.8 (cvelist)

## Mitigation

- Upgrade Linux to 24daca4fc07f3ff8cd0e3f629cd982187f48436a or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31787. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31787.md
Affected: Linux >= d71f513985c22f1050295d1a7e4327cf9fb060da, < dbf862ce9f009128ab86b234d91413a3e450beb4; >= d71f513985c22f1050295d1a7e4327cf9fb060da, < 2b985d3a024b9e8c24e21671b34e855569763808; >= d71f513985c22f1050295d1a7e4327cf9fb060da, < 1576ff3869cbd3620717195f971c85b7d7fd62b5; >= d71f513985c22f1050295d1…
Fixed in: Linux 2b985d3a024b9e8c24e21671b34e855569763808, Linux 1576ff3869cbd3620717195f971c85b7d7fd62b5, Linux 402d84ad9e89bd4cbfd07ca8598532b7021daf95, Linux 2894a351fe2ea8684919d36df3188b9a35e3926f, Linux 446ee446d9ae66f36e95c3c90bbcc4e56b94cde0, Linux 71bf829800758a6e3889096e4754ef47ba7fc850, Linux 24dac…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31787 being exploited?

There is no confirmed exploitation: CVE-2026-31787 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-31787?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31787?

Linux \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< dbf862ce9f009128ab86b234d91413a3e450beb4; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 2b985d3a024b9e8c24e21671b34e855569763808; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 1576ff3869cbd3620717195f971c85b7d7fd62b5; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 402d84ad9e89bd4cbfd07ca8598532b7021daf95; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 2894a351fe2ea8684919d36df3188b9a35e3926f; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 446ee446d9ae66f36e95c3c90bbcc4e56b94cde0; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 71bf829800758a6e3889096e4754ef47ba7fc850; \>= d71f513985c22f1050295d1a7e4327cf9fb060da, \< 24daca4fc07f3ff8cd0e3f629cd982187f48436a; Linux 3.8.

### Is there a fix for CVE-2026-31787?

Yes. Fixed in Linux 2b985d3a024b9e8c24e21671b34e855569763808, Linux 1576ff3869cbd3620717195f971c85b7d7fd62b5, Linux 402d84ad9e89bd4cbfd07ca8598532b7021daf95, Linux 2894a351fe2ea8684919d36df3188b9a35e3926f, Linux 446ee446d9ae66f36e95c3c90bbcc4e56b94cde0, Linux 71bf829800758a6e3889096e4754ef47ba7fc850, Linux 24daca4fc07f3ff8cd0e3f629cd982187f48436a. Upgrade Linux to 24daca4fc07f3ff8cd0e3f629cd982187f48436a or later.

### How do I check if I'm affected by CVE-2026-31787?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/dbf862ce9f009128ab86b234d91413a3e450beb4>
- patch: <https://git.kernel.org/stable/c/2b985d3a024b9e8c24e21671b34e855569763808>
- patch: <https://git.kernel.org/stable/c/1576ff3869cbd3620717195f971c85b7d7fd62b5>
- patch: <https://git.kernel.org/stable/c/402d84ad9e89bd4cbfd07ca8598532b7021daf95>
- patch: <https://git.kernel.org/stable/c/2894a351fe2ea8684919d36df3188b9a35e3926f>
- patch: <https://git.kernel.org/stable/c/446ee446d9ae66f36e95c3c90bbcc4e56b94cde0>
- patch: <https://git.kernel.org/stable/c/71bf829800758a6e3889096e4754ef47ba7fc850>
- patch: <https://git.kernel.org/stable/c/24daca4fc07f3ff8cd0e3f629cd982187f48436a>
- other: <http://www.openwall.com/lists/oss-security/2026/04/28/14>
- other: <http://xenbits.xen.org/xsa/advisory-487.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31787>

HTML: <https://flawdb.com/CVE-2026-31787> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31787>
