CVE-2026-139202
publishedbpf: Validate stack arg reads against caller state
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux0f6bd5e7a804af27e7f34b8306afde7a6b269318 to < 2baf358407edb426fc3c6d90e1df9ee9f88f8e07 · 0f6bd5e7a804af27e7f34b8306afde7a6b269318 to < 90aedf8854c05713c02b381c41c59081b5cedbcc · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux7.2 (affected) · 0 to < 7.2 (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Validate stack arg reads against caller state check_stack_arg_read() bounds a stack argument index with the callee's BTF-derived argument count, then uses the index in the caller's stack_arg_regs[] array. The array's actual logical length is recorded in caller->out_stack_arg_cnt, so the bound and indexed object can diverge. A crafted BPF_PROG_LOAD can use an argument mismatch to mark a static subprogram's BTF information unreliable. Later calls return from btf_check_subprog_call() before check_outgoing_stack_args(), while check_func_call() continues the static call on -EINVAL. The callee can then read a slot that the caller never allocated or initialized. The earlier commit 4286f5deee14 ("bpf: Validate outgoing stack args when btf_prepare_func_args fails") closed this hole for the first call, but not for later calls after the subprogram has been marked unreliable. Callbacks have a related problem. The verifier can make incoming stack arguments readable from outgoing slots at the helper call site. However, helpers and kfuncs invoke callbacks through an ABI that passes at most five arguments, so the runtime callback receives no stack arguments. Async callback verification can also reach check_stack_arg_read() without a caller frame. On x86-64, KASAN reports the direct-call out-of-bounds copy as: BUG: KASAN: slab-out-of-bounds in check_load_mem+0xb51/0xc60 Read of size 80 at addr ffff8881009af550 by task poc/131 Call Trace: check_stack_arg_read at kernel/bpf/verifier.c:4234 (inlined by) check_load_mem at kernel/bpf/verifier.c:6645 do_check_common at kernel/bpf/verifier.c:19568 bpf_check at kernel/bpf/verifier.c:21318 bpf_prog_load at kernel/bpf/syscall.c:3134 Reject callback subprograms with incoming stack arguments before their state is pushed. For direct calls, retrieve the slot with bpf_get_spilled_stack_arg(), which validates the index against the caller's out_stack_arg_cnt and rejects uninitialized slots before copying the register state.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 0f6bd5e7a804af27e7f34b8306afde7a6b269318 to < 2baf358407edb426fc3c6d90e1df9ee9f88f8e07 (affected · git)0f6bd5e7a804af27e7f34b8306afde7a6b269318 to < 90aedf8854c05713c02b381c41c59081b5cedbcc (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 7.2 (affected)0 to < 7.2 (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
1Linux · cna
bpf: Validate stack arg reads against caller state
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 8d6f6fa0a2dcede1e494c1aa5fb3628c17fe727fcbeac34b99f2c07e02cd28e7
- Ingested
- 30 Nov 2026, 13:42:23 UTC
- Source record
- Official CVE record