{"id":"CVE-2026-98613","title":"bpf: Bound ownership depth through local kptrs and graph roots","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Bound ownership depth through local kptrs and graph roots\n\nProgram-allocated objects can own other local objects through referenced\nkptrs. bpf_obj_free_fields() fo…","severity":"none","vendor":"Linux","product":"Linux","affected":["Linux >= b0966c724584a5a9fd7fb529de19807c31f27a45 < 92aa0502c781d72bb9685245c3280efb3766a110","Linux >= b0966c724584a5a9fd7fb529de19807c31f27a45 < 9c11e543fec32e92b3aa3f693339ca3ee79ea9dd","Linux >= b0966c724584a5a9fd7fb529de19807c31f27a45 < 4105870a4b8afe852aeb24a6dd58e1836cc4ce58","Linux >= b0966c724584a5a9fd7fb529de19807c31f27a45 < bfc888f04588f591851e95c974954cfca58e6c19","Linux 6.12"],"published":"2026-10-18","updated":"2026-10-18","sourceUpdated":"2026-10-18T15:19:33.624Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-98613","references":[{"url":"https://git.kernel.org/stable/c/92aa0502c781d72bb9685245c3280efb3766a110"},{"url":"https://git.kernel.org/stable/c/9c11e543fec32e92b3aa3f693339ca3ee79ea9dd"},{"url":"https://git.kernel.org/stable/c/4105870a4b8afe852aeb24a6dd58e1836cc4ce58"},{"url":"https://git.kernel.org/stable/c/bfc888f04588f591851e95c974954cfca58e6c19"}],"tags":["cve.org"],"ingestedAt":"2026-10-18T15:45:12.240Z","slug":"CVE-2026-98613","body":"## Overview\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Bound ownership depth through local kptrs and graph roots\n\nProgram-allocated objects can own other local objects through referenced\nkptrs. bpf_obj_free_fields() follows those pointers through\n__bpf_obj_drop_impl() synchronously, before the object storage is freed\nthrough RCU. A self-referential local kptr type therefore permits arbitrarily\ndeep object chains, and dropping the head can exhaust the kernel stack.\nLong acyclic type chains have the same problem.\n\nbtf_check_and_fixup_fields() still assumes referenced kptrs only point to\nkernel types and checks ownership through list and rbtree roots only. Its\nexisting rule is sufficient for graph-only cycles: the target of each graph\nedge must contain a node, so every type in a cycle has both a root and a\nnode. The rule rejects such a type owning another root, breaking every\ncycle. It also limits graph-only chains to three types, or two if the first\ntype contains a node, and conservatively rejects longer acyclic chains.\nThe missing local-kptr edges, rather than a missed graph-only cycle, are the\nbug introduced by support for bpf_kptr_xchg() into local kptrs.\n\nReplace that restriction with one bounded ownership walk covering graph\nroots and local referenced kptrs. Run it after all BTF records have been\nfixed up, reject cycles and paths deeper than eight record-bearing types,\nand cache each type's suffix depth while checking it against the remaining\nbudget. This also permits the longer acyclic graph-only layouts rejected\nby the old rule; update their existing BTF tests accordingly.\n\nKeep the bound independent of MAX_CALL_FRAMES because recursive destruction\ncan run below a BPF call chain. A plain local pointee without special-field\nmetadata adds only a final non-recursing drop. Non-owning kptrs and\nkernel-BTF kptrs do not recurse through local records and remain outside the\nwalk. Include local percpu-kptr edges too, although allocation of percpu\nobjects with special fields is currently forbidden, so that relaxing that\nrestriction cannot bypass the ownership bound.\n\nbtf_check_and_fixup_fields() continues to initialize graph_root.value_rec,\nincluding for separately allocated map records. The ownership relationships\nbelong to immutable program BTF and only need validation at BTF load time.\n\n## Affected\n\n- `Linux >= b0966c724584a5a9fd7fb529de19807c31f27a45 < 92aa0502c781d72bb9685245c3280efb3766a110`\n- `Linux >= b0966c724584a5a9fd7fb529de19807c31f27a45 < 9c11e543fec32e92b3aa3f693339ca3ee79ea9dd`\n- `Linux >= b0966c724584a5a9fd7fb529de19807c31f27a45 < 4105870a4b8afe852aeb24a6dd58e1836cc4ce58`\n- `Linux >= b0966c724584a5a9fd7fb529de19807c31f27a45 < bfc888f04588f591851e95c974954cfca58e6c19`\n- `Linux 6.12`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":3,"depthScoreParts":{"impact":2.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}