{"id":"CVE-2026-143321","state":"PUBLISHED","title":"bpf: Don't trust pointers spilled in slots that a callee can write","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't trust pointers spilled in slots that a callee can write\n\narg_track follows pointers to the stack through registers and spills.\nScalar evolution and the removal of dead slots rely on it to know which\nslots an insn reads and writes.\n\narg_track assumes that a call does not change the pointers that are spilled\nin the frame of the caller. But a static subprog or a callback can store\na pointer to other memory there, and the caller can use it:\n\n  *(u64 *)(r10 - 16) = fp-8\n  r1 = fp-16, r2 = map_value\n  call sub                        ; *(u64 *)(r1 + 0) = r2\n  r7 = *(u64 *)(r10 - 16)         ; verifier: map_value. arg_track: fp-8\n  *(u64 *)(r10 - 8) = fp-24\n  *(u64 *)(r7 + 0) = 0            ; arg_track: fp-8 is overwritten\n  r8 = *(u64 *)(r10 - 8)          ; verifier: fp-24. arg_track: none\n  loop:\n    r1 = *(u64 *)(r10 - 24)       ; the counter of the loop\n    ...\n    *(u64 *)(r8 + 0) = 4096       ; arg_track: not a write to fp-24\n\nScalar evolution does not see the last store. It gives the counter the\nrange of a loop that only increments it. The prog loads, and it accesses\na map value out of bounds.\n\nValid progs are rejected as well. The store through r7 makes fp-8 dead, and\na later read of fp-8 fails with \"slot poisoned by dead code elimination\".\n\nWhen a static subprog or a callback can get a pointer to the frame of its\ncaller, join every slot of that frame with \"not a pointer to the stack\".\nReads and possible writes through a filled pointer are still seen, but no\nstore through it is a certain write. It has to be every slot: the callee\nreaches the whole frame from one pointer, and callees are analyzed after\nthe caller. The price is precision: an 8-byte load through a filled\npointer gives a value that can point to any frame.\n\nFor a spilled copy of r10 this needs \"bpf: Fix the join of fp+0 with\na value that is not a pointer to stack\".\n\nIn selftests, Cilium and sched_ext the stack marks change in 4 of 12522\nprogs. Verdicts, insns and states do not change in any prog.\n\none_fp_clear_stack_threshold and two_fp_clear_stack_threshold expect the\nfake offset fp+0 in the log now.","publishedAt":"2026-12-03T09:21:49.088Z","updatedAt":"2026-12-03T09:21:49.088Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bf0c571f7feb6fa05a512e2a5e50702501849d61","status":"affected","lessThan":"6420b2a5fc52ed075bf9ac3841ba4a073a2be1b9","versionType":"git"},{"version":"bf0c571f7feb6fa05a512e2a5e50702501849d61","status":"affected","lessThan":"cdefba74b53fb9b482355ebde1654800aea45dae","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/liveness.c","tools/testing/selftests/bpf/progs/verifier_live_stack.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/liveness.c","tools/testing/selftests/bpf/progs/verifier_live_stack.c"]}],"references":["https://git.kernel.org/stable/c/6420b2a5fc52ed075bf9ac3841ba4a073a2be1b9","https://git.kernel.org/stable/c/cdefba74b53fb9b482355ebde1654800aea45dae"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143321.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143321","state":"PUBLISHED","datePublished":"2026-12-03T09:21:49.088Z","dateUpdated":"2026-12-03T09:21:49.088Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.366Z"},"containers":{"cna":{"title":"bpf: Don't trust pointers spilled in slots that a callee can write","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't trust pointers spilled in slots that a callee can write\n\narg_track follows pointers to the stack through registers and spills.\nScalar evolution and the removal of dead slots rely on it to know which\nslots an insn reads and writes.\n\narg_track assumes that a call does not change the pointers that are spilled\nin the frame of the caller. But a static subprog or a callback can store\na pointer to other memory there, and the caller can use it:\n\n  *(u64 *)(r10 - 16) = fp-8\n  r1 = fp-16, r2 = map_value\n  call sub                        ; *(u64 *)(r1 + 0) = r2\n  r7 = *(u64 *)(r10 - 16)         ; verifier: map_value. arg_track: fp-8\n  *(u64 *)(r10 - 8) = fp-24\n  *(u64 *)(r7 + 0) = 0            ; arg_track: fp-8 is overwritten\n  r8 = *(u64 *)(r10 - 8)          ; verifier: fp-24. arg_track: none\n  loop:\n    r1 = *(u64 *)(r10 - 24)       ; the counter of the loop\n    ...\n    *(u64 *)(r8 + 0) = 4096       ; arg_track: not a write to fp-24\n\nScalar evolution does not see the last store. It gives the counter the\nrange of a loop that only increments it. The prog loads, and it accesses\na map value out of bounds.\n\nValid progs are rejected as well. The store through r7 makes fp-8 dead, and\na later read of fp-8 fails with \"slot poisoned by dead code elimination\".\n\nWhen a static subprog or a callback can get a pointer to the frame of its\ncaller, join every slot of that frame with \"not a pointer to the stack\".\nReads and possible writes through a filled pointer are still seen, but no\nstore through it is a certain write. It has to be every slot: the callee\nreaches the whole frame from one pointer, and callees are analyzed after\nthe caller. The price is precision: an 8-byte load through a filled\npointer gives a value that can point to any frame.\n\nFor a spilled copy of r10 this needs \"bpf: Fix the join of fp+0 with\na value that is not a pointer to stack\".\n\nIn selftests, Cilium and sched_ext the stack marks change in 4 of 12522\nprogs. Verdicts, insns and states do not change in any prog.\n\none_fp_clear_stack_threshold and two_fp_clear_stack_threshold expect the\nfake offset fp+0 in the log now."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bf0c571f7feb6fa05a512e2a5e50702501849d61","status":"affected","lessThan":"6420b2a5fc52ed075bf9ac3841ba4a073a2be1b9","versionType":"git"},{"version":"bf0c571f7feb6fa05a512e2a5e50702501849d61","status":"affected","lessThan":"cdefba74b53fb9b482355ebde1654800aea45dae","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/liveness.c","tools/testing/selftests/bpf/progs/verifier_live_stack.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/liveness.c","tools/testing/selftests/bpf/progs/verifier_live_stack.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6420b2a5fc52ed075bf9ac3841ba4a073a2be1b9"},{"url":"https://git.kernel.org/stable/c/cdefba74b53fb9b482355ebde1654800aea45dae"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:21:49.088Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}