CVE-2026-31786: Buffer overflow in drivers/xen/sys-hypervisor.c
In the Linux kernel, the following vulnerability has been resolved:
Buffer overflow in drivers/xen/sys-hypervisor.c
The build id returned by HYPERVISOR_xen_version(XENVER_build_id) is
neither NUL terminated nor a string.
The first causes a buffer overflow as sprintf in buildid_show will
read and copy till it finds a NUL.
00000000 f4 91 51 f4 dd 38 9e 9d 65 47 52 eb 10 71 db 50 |..Q..8..eGR..q.P|
00000010 b9 a8 01 42 6f 2e 32 |...Bo.2|
00000017
So use a memcpy instead of sprintf to have the correct value:
00000000 f4 91 51 f4 dd 00 9e 9d 65 47 52 eb 10 71 db 50 |..Q.....eGR..q.P|
00000010 b9 a8 01 42 |...B|
00000014
(the above have a hack to embed a zero inside and check it's
returned correctly).
This is XSA-485 / CVE-2026-31786
Security readout for executives and security teams
Plain-English summary
A local, low-privileged user may trigger a Linux kernel buffer overflow while Xen build information is displayed. Successful exploitation could compromise confidentiality, integrity, and availability. The supplied evidence does not establish remote exploitation, guest escape, or exploitation in the wild.
Executive priority
Treat this as a high-priority maintenance issue for Xen-connected Linux systems permitting untrusted local access. Accelerate inventory and vendor-kernel updates, while avoiding claims of emergency internet-wide exploitation because the supplied evidence supports only a local attack path and no active exploitation.
Technical view
Xen returns a binary build identifier without guaranteed NUL termination. Linux buildid_show used sprintf as though that value were a string, allowing reads and copying beyond its boundary. The published correction replaces sprintf with length-bounded memcpy, preserving embedded zero bytes and preventing the overflow.
Likely exposure
Exposure is most likely on affected Linux kernels using Xen interfaces where a low-privileged local user can reach the build-ID display path. The supplied version data spans multiple kernel branches, but exact distribution package boundaries are incomplete; confirm status with each Linux vendor.
Exploitation context
CVSS 3.1 rates this 7.8: local access, low complexity, low privileges, no user interaction, and potentially high confidentiality, integrity, and availability impact. The bundle reports no KEV listing and provides no evidence of active exploitation. It does not demonstrate remote access or a Xen guest escape.
Researcher notes
The defect is an unbounded string operation on a length-delimited binary Xen build ID. Embedded NUL handling is also correctness-relevant. Stable kernel commits are supplied, but the bundle lacks branch-to-commit mapping, distribution backport status, proof-of-concept evidence, and demonstrated exploitation outcomes. Do not infer guest escape from the XSA association alone.
Mitigation direction
Update to a vendor kernel incorporating the cited stable fix for the deployed branch.
Reboot affected systems into the updated kernel after installation.
Limit untrusted local account access until updates are applied.
Consult Linux distribution and Xen guidance for branch-specific remediation status.
Validation and detection
Inventory Linux kernel versions on systems using Xen interfaces.
Confirm vendor advisories or changelogs identify CVE-2026-31786 as fixed.
Verify the running kernel includes the bounded memcpy correction in sys-hypervisor.c.
After reboot, confirm every affected node runs the remediated kernel.
Review kernel logs for faults associated with buildid_show before remediation.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2026-31786 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
9Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.