{"id":"CVE-2026-99566","aliases":["CVE-2026-99566"],"related":[],"kind":"vulnerability","state":"published","title":"assoc_array: keep gc's cleanup out of the live tree on allocation failure","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nassoc_array: keep gc's cleanup out of the live tree on allocation failure\n\nassoc_array_gc() builds a copy of the tree.  Where the copy reaches a\nshortcut, it allocates the copy of the shortcut with kmalloc_flex(),\nfills it with memcpy(), links it into the new tree, and only then\nallocates the copy of the node after it.  The memcpy() leaves the new\nshortcut's next_node pointing at the old tree's node, so if that second\nallocation fails, the cleanup, assoc_array_destroy_subtree() on the new\ntree, follows the new shortcut into the old tree, and the BUG_ON() on\nthe old node's back pointer fires.\n\nAllocate the node first, and the shortcut once the node exists, freeing\nthe node again if the shortcut cannot be allocated.  A copied shortcut\nis then only linked into the new tree when the copy of its node is there\nto follow it.  Nothing else changes: with no allocation failing, the\ntrees gc builds are the same as before.\n\nFound by a userspace test that makes each allocation of each operation\nfail in turn.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nassoc_array: keep gc's cleanup out of the live tree on allocation failure\n\nassoc_array_gc() builds a copy of the tree.  Where the copy reaches a\nshortcut, it allocates the copy of the shortcut with kmalloc_flex(),\nfills it with memcpy(), links it into the new tree, and only then\nallocates the copy of the node after it.  The memcpy() leaves the new\nshortcut's next_node pointing at the old tree's node, so if that second\nallocation fails, the cleanup, assoc_array_destroy_subtree() on the new\ntree, follows the new shortcut into the old tree, and the BUG_ON() on\nthe old node's back pointer fires.\n\nAllocate the node first, and the shortcut once the node exists, freeing\nthe node again if the shortcut cannot be allocated.  A copied shortcut\nis then only linked into the new tree when the copy of its node is there\nto follow it.  Nothing else changes: with no allocation failing, the\ntrees gc builds are the same as before.\n\nFound by a userspace test that makes each allocation of each operation\nfail in turn.","source":"cvelist"}],"published":"2026-11-20T05:49:02.562Z","modified":"2026-11-23T08:17:58.603Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"3cb989501c2688cacbb7dc4b0d353faf838f53a1","fixed":"86ea23a14af6e909dd4d3f92ff370f3b06bc6827","status":"affected"},{"type":"git","introduced":"3cb989501c2688cacbb7dc4b0d353faf838f53a1","fixed":"f1c3efeb27f2663f1bcd6f794e22aca96c61f018","status":"affected"},{"type":"git","introduced":"3cb989501c2688cacbb7dc4b0d353faf838f53a1","fixed":"5511f84917cc4021b46fdf626ae354f28824dacb","status":"affected"},{"type":"git","introduced":"3cb989501c2688cacbb7dc4b0d353faf838f53a1","fixed":"8d7e5fade0a956775d7d695499df490ef3e96a07","status":"affected"},{"type":"git","introduced":"3cb989501c2688cacbb7dc4b0d353faf838f53a1","fixed":"cd39c75fbd52017064879061c2f97fa573984c93","status":"affected"},{"type":"git","introduced":"3cb989501c2688cacbb7dc4b0d353faf838f53a1","fixed":"c9138a6357a68762e499143160d0d7e0cba3228c","status":"affected"},{"type":"git","introduced":"3cb989501c2688cacbb7dc4b0d353faf838f53a1","fixed":"c80609763abd3f8ee7c1fe69dd43b07abff474f0","status":"affected"},{"type":"git","introduced":"3cb989501c2688cacbb7dc4b0d353faf838f53a1","fixed":"8afff2e4b90978b8203f9e3898995dcf86821b49","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.13","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.118","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.64","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.5","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc4","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/86ea23a14af6e909dd4d3f92ff370f3b06bc6827","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f1c3efeb27f2663f1bcd6f794e22aca96c61f018","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5511f84917cc4021b46fdf626ae354f28824dacb","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8d7e5fade0a956775d7d695499df490ef3e96a07","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cd39c75fbd52017064879061c2f97fa573984c93","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c9138a6357a68762e499143160d0d7e0cba3228c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c80609763abd3f8ee7c1fe69dd43b07abff474f0","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8afff2e4b90978b8203f9e3898995dcf86821b49","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99566","url":"https://www.cve.org/CVERecord?id=CVE-2026-99566","licence":"CVE Terms of Use","modified":"2026-11-23T08:04:27.461Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99566","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99566","licence":"Public domain","modified":"2026-11-23T08:17:58.603Z"}],"updatedAt":"2026-11-25T22:59:52.263Z","epss":{"score":0.00211,"percentile":0.06474,"date":"2026-11-30T12:00:22.000Z"}}