{"id":"CVE-2026-99795","aliases":[],"kind":"cve","tier":"hot","status":"published","title":"cxl/features: Ensure that count is set before access to ent[] __counted_by()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncxl/features: Ensure that count is set before access to ent[] __counted_by()\n\nget_supported_features() assigns entries->num_features only after the\nmemcpy() loop that fills entries->ent[] has already run. Since ent[]\nis __counted_by(num_features), the compiler's bounds instrumentation\nsees a 0-length array during that loop and FORTIFY_SOURCE trips on\nthe memcpy. Set @num_features right after allocation, before any\nwrite into ent[], so the bound is correct for the whole lifetime of\nthe array.\n\nThis was found via a fortify panic:\n\n memcpy: detected buffer overflow: 384 byte write of buffer size 0\n WARNING: lib/string_helpers.c:1035 at __fortify_report+0x54/0xa0\n kernel BUG at lib/string_helpers.c:1043!\n Call trace:\n  __fortify_panic+0x10/0x18\n  get_supported_features.isra.0+0x4a0/0x4d0 [cxl_core]\n  devm_cxl_setup_features+0x84/0x120 [cxl_core]\n  cxl_pci_probe+0x254/0x5e0 [cxl_pci]\n\nSame class of bug, same fix shape as commit 6c9d2e87df40\n(\"cxl/fwctl: Fix __fortify_panic\"), which fixed the analogous issue\nin cxlctl_get_supported_features() but missed this one.\n\n[ dj: Fixed up title typo per Jonathan. ]","ai_summary":null,"severity":"unknown","cvss":null,"scores":[],"cwe":[],"remote":null,"remote_unauth":null,"epss":{"score":0.00219,"percentile":0.0712,"date":"2026-11-26"},"kev":{"listed":false,"added":null,"due":null,"ransomware":null},"exploit":{"public":false,"exploitdb_ids":[]},"affected":[],"affected_products":[{"source":"cvelist","vendor":"Linux","product":"Linux","versions":">= f0e6a2329bf9d44138be2163370ae9537cbdaf74, < 63714fa4033b51ce615be6f083be0b19847d0d1e; >= f0e6a2329bf9d44138be2163370ae9537cbdaf74, < deb8b87c027db150de626a5808f648b1e52d90a1; >= f0e6a2329bf9d44138be2163370ae9537cbdaf74, < c1031c2474f73261d8d5e4deef2b5dc20fb964f5"},{"source":"cvelist","vendor":"Linux","product":"Linux","versions":"6.15"}],"ai_versions":null,"mitigation":"No fix listed yet: follow the vendor advisory.","technologies":[{"slug":"linux-kernel","name":"Linux kernel","method":"cpe"}],"references":[{"url":"https://git.kernel.org/stable/c/63714fa4033b51ce615be6f083be0b19847d0d1e","kind":"other"},{"url":"https://git.kernel.org/stable/c/deb8b87c027db150de626a5808f648b1e52d90a1","kind":"other"},{"url":"https://git.kernel.org/stable/c/c1031c2474f73261d8d5e4deef2b5dc20fb964f5","kind":"other"}],"workarounds":null,"vendors":["linux"],"products":["linux"],"cpes":[],"published_at":"2026-11-20T05:51:54.478Z","modified_at":"2026-11-20T06:18:19.000Z","promoted_at":null,"attribution":[{"source":"CVE Program","text":"CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation.","url":"https://www.cve.org/Legal/TermsOfUse"},{"source":"NVD","text":"This product uses data from the NVD API but is not endorsed or certified by the NVD.","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99795"},{"source":"FIRST EPSS","text":"EPSS scores by FIRST","url":"https://www.first.org/epss/"}],"links":{"html":"https://flawdb.com/CVE-2026-99795","markdown":"https://flawdb.com/CVE-2026-99795.md","json":"https://flawdb.com/api/v1/entries/CVE-2026-99795"}}