{"id":"CVE-2026-31787","aliases":["CVE-2026-31787"],"related":[],"kind":"vulnerability","state":"published","title":"xen/privcmd: fix double free via VMA splitting","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nxen/privcmd: fix double free via VMA splitting\n\nprivcmd_vm_ops defines .close (privcmd_close), but neither .may_split\nnor .open. When userspace does a partial munmap() on a privcmd mapping,\nthe kernel splits the VMA via __split_vma(). Since may_split is NULL,\nthe split is allowed. vm_area_dup() copies vm_private_data (a pages\narray allocated in alloc_empty_pages()) into the new VMA without any\nfixup, because there is no .open callback.\n\nBoth VMAs now point to the same pages array. When the unmapped portion\nis closed, privcmd_close() calls:\n    - xen_unmap_domain_gfn_range()\n    - xen_free_unpopulated_pages()\n    - kvfree(pages)\n\nThe surviving VMA still holds the dangling pointer. When it is later\ndestroyed, the same sequence runs again, which leads to a double free.\n\nFix this issue by adding a .may_split callback denying the VMA split.\n\nThis is XSA-487 / CVE-2026-31787","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nxen/privcmd: fix double free via VMA splitting\n\nprivcmd_vm_ops defines .close (privcmd_close), but neither .may_split\nnor .open. When userspace does a partial munmap() on a privcmd mapping,\nthe kernel splits the VMA via __split_vma(). Since may_split is NULL,\nthe split is allowed. vm_area_dup() copies vm_private_data (a pages\narray allocated in alloc_empty_pages()) into the new VMA without any\nfixup, because there is no .open callback.\n\nBoth VMAs now point to the same pages array. When the unmapped portion\nis closed, privcmd_close() calls:\n    - xen_unmap_domain_gfn_range()\n    - xen_free_unpopulated_pages()\n    - kvfree(pages)\n\nThe surviving VMA still holds the dangling pointer. When it is later\ndestroyed, the same sequence runs again, which leads to a double free.\n\nFix this issue by adding a .may_split callback denying the VMA split.\n\nThis is XSA-487 / CVE-2026-31787","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad:\n\nxen/privcmd: corrige doble liberación a través de la división de VMA\n\nprivcmd_vm_ops define .close (privcmd_close), pero ni .may_split ni .open. Cuando el espacio de usuario realiza un munmap() parcial en un mapeo de privcmd, el kernel divide el VMA a través de __split_vma(). Dado que may_split es NULL, se permite la división. vm_area_dup() copia vm_private_data (un array de páginas asignado en alloc_empty_pages()) en el nuevo VMA sin ninguna corrección, porque no hay una devolución de llamada .open.\n\nAmbos VMA ahora apuntan al mismo array de páginas. Cuando la porción desmapeada se cierra, privcmd_close() llama a:\n    - xen_unmap_domain_gfn_range()\n    - xen_free_unpopulated_pages()\n    - kvfree(pages)\n\nEl VMA superviviente aún mantiene el puntero colgante. Cuando se destruye más tarde, la misma secuencia se ejecuta de nuevo, lo que lleva a una doble liberación.\n\nSolucione este problema añadiendo una devolución de llamada .may_split que deniegue la división del VMA.\n\nEsto es XSA-487 / CVE-2026-31787","source":"nvd"}],"published":"2026-04-30T10:31:28.992Z","modified":"2026-11-11T21:10:00.200Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-415"],"affected":[{"ranges":[{"type":"git","introduced":"d71f513985c22f1050295d1a7e4327cf9fb060da","fixed":"dbf862ce9f009128ab86b234d91413a3e450beb4","status":"affected"},{"type":"git","introduced":"d71f513985c22f1050295d1a7e4327cf9fb060da","fixed":"2b985d3a024b9e8c24e21671b34e855569763808","status":"affected"},{"type":"git","introduced":"d71f513985c22f1050295d1a7e4327cf9fb060da","fixed":"1576ff3869cbd3620717195f971c85b7d7fd62b5","status":"affected"},{"type":"git","introduced":"d71f513985c22f1050295d1a7e4327cf9fb060da","fixed":"402d84ad9e89bd4cbfd07ca8598532b7021daf95","status":"affected"},{"type":"git","introduced":"d71f513985c22f1050295d1a7e4327cf9fb060da","fixed":"2894a351fe2ea8684919d36df3188b9a35e3926f","status":"affected"},{"type":"git","introduced":"d71f513985c22f1050295d1a7e4327cf9fb060da","fixed":"446ee446d9ae66f36e95c3c90bbcc4e56b94cde0","status":"affected"},{"type":"git","introduced":"d71f513985c22f1050295d1a7e4327cf9fb060da","fixed":"71bf829800758a6e3889096e4754ef47ba7fc850","status":"affected"},{"type":"git","introduced":"d71f513985c22f1050295d1a7e4327cf9fb060da","fixed":"24daca4fc07f3ff8cd0e3f629cd982187f48436a","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.8","status":"unaffected"},{"type":"semver","introduced":"5.10.254","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.204","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.170","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.137","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.85","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.26","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.3","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.8","fixed":"5.10.254"},{"status":"affected","introduced":"5.11","fixed":"5.15.204"},{"status":"affected","introduced":"5.16","fixed":"6.1.170"},{"status":"affected","introduced":"6.2","fixed":"6.6.137"},{"status":"affected","introduced":"6.7","fixed":"6.12.85"},{"status":"affected","introduced":"6.13","fixed":"6.18.26"},{"status":"affected","introduced":"6.19","fixed":"7.0.3"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/dbf862ce9f009128ab86b234d91413a3e450beb4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2b985d3a024b9e8c24e21671b34e855569763808","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1576ff3869cbd3620717195f971c85b7d7fd62b5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/402d84ad9e89bd4cbfd07ca8598532b7021daf95","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2894a351fe2ea8684919d36df3188b9a35e3926f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/446ee446d9ae66f36e95c3c90bbcc4e56b94cde0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/71bf829800758a6e3889096e4754ef47ba7fc850","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/24daca4fc07f3ff8cd0e3f629cd982187f48436a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"http://www.openwall.com/lists/oss-security/2026/04/28/14","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"http://xenbits.xen.org/xsa/advisory-487.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T15:25:39.751Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31787","url":"https://www.cve.org/CVERecord?id=CVE-2026-31787","licence":"CVE Terms of Use","modified":"2026-11-06T15:32:25.719Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31787","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31787","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.277Z","epss":{"score":0.00187,"percentile":0.08663,"date":"2026-12-01T12:00:22.000Z"}}