{
  "threat_severity" : "Important",
  "public_date" : "2026-04-30T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: Buffer overflow in drivers/xen/sys-hypervisor.c",
    "id" : "2464096",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2464096"
  },
  "cvss3" : {
    "cvss3_base_score" : "7.0",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
    "status" : "draft"
  },
  "cwe" : "CWE-170",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nBuffer overflow in drivers/xen/sys-hypervisor.c\nThe build id returned by HYPERVISOR_xen_version(XENVER_build_id) is\nneither NUL terminated nor a string.\nThe first causes a buffer overflow as sprintf in buildid_show will\nread and copy till it finds a NUL.\n00000000  f4 91 51 f4 dd 38 9e 9d  65 47 52 eb 10 71 db 50  |..Q..8..eGR..q.P|\n00000010  b9 a8 01 42 6f 2e 32                              |...Bo.2|\n00000017\nSo use a memcpy instead of sprintf to have the correct value:\n00000000  f4 91 51 f4 dd 00 9e 9d  65 47 52 eb 10 71 db 50  |..Q.....eGR..q.P|\n00000010  b9 a8 01 42                                       |...B|\n00000014\n(the above have a hack to embed a zero inside and check it's\nreturned correctly).\nThis is XSA-485 / CVE-2026-31786", "A flaw was found in the Linux kernel. A buffer overflow vulnerability exists in the Xen hypervisor driver (`drivers/xen/sys-hypervisor.c`). This flaw occurs because the `HYPERVISOR_xen_version(XENVER_build_id)` function returns a build ID that is not properly null-terminated. When the `buildid_show` function attempts to process this non-null-terminated string using `sprintf`, it can read and copy beyond the intended buffer boundary, potentially leading to a denial of service or other unspecified impacts." ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 10",
    "fix_state" : "Affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:10"
  }, {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Under investigation",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2026-31786\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-31786\nhttps://lore.kernel.org/linux-cve-announce/2026043031-CVE-2026-31786-826a@gregkh/T" ],
  "name" : "CVE-2026-31786",
  "csaw" : false
}