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

Out-of-bounds read in Linux kernel Xen sysfs buildid handling

IdentifiersCVE-2026-31786CWE-126

CVE-2026-31786 (XSA-485) is a Linux kernel vulnerability in drivers/xen/sys-hypervisor.c affecting the sysfs exposure of the Xen build ID via /sys/hypervisor/properties/buildid. The Xen hypervisor returns the build ID as binary data that is neither NUL-terminated nor a string. The vulnerable kernel code used sprintf() in buildid_show to copy this value into the sysfs output buffer, causing the kernel to continue reading memory until a zero byte is encountered. This results in an out-of-bounds read from kernel memory. The fix replaces sprintf() with memcpy() so the exact binary length is copied without string interpretation. Supporting advisory text also notes that, in rare cases where no zero byte is encountered within the following sysfs buffer region, the bug may also lead to a write past the 4 KB sysfs buffer.

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 can disclose adjacent kernel memory contents to a local user able to read the Xen-related sysfs file, potentially exposing sensitive kernel data or secrets. According to XSA-485, the flaw may also enable denial of service and, in rare cases, privilege escalation within Linux Xen domains. The advisory further notes a low-probability scenario in which memory beyond the 4 KB sysfs buffer could be overwritten, increasing the risk beyond pure information disclosure.

Mitigation

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

No known mitigation is available short of applying the vendor patch. Where immediate patching is not possible, reducing untrusted local access within affected Linux Xen domains may reduce exposure, but the advisory explicitly states there is no known mitigation.

Remediation

Patch, then assume compromise.

Apply the Linux kernel patch from XSA-485 that changes the vulnerable handling in drivers/xen/sys-hypervisor.c/buildid_show from sprintf() to memcpy(), ensuring the Xen build ID is copied as fixed-length binary data rather than treated as a NUL-terminated string. Update to a kernel build that includes the CVE-2026-31786 fix. Xen identifies the patch as xsa485-linux.patch.
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 activity6

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