CVE-2026-139202: bpf: Validate stack arg reads against caller state

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

bpf: Validate stack arg reads against caller state

checkstackargread() bounds a stack argument index with the callee's BTF-derived argument count, then uses the index in the caller's stackargregs[] array. The array's actual logical length is recorded in caller->outstackargcnt, so the bound and indexed object can diverge.

A crafted BPFPROGLOAD can use an argument mismatch to mark a static subprogram's BTF information unreliable. Later calls return from btfchecksubprogcall() before checkoutgoingstackargs(), while checkfunccall() 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 btfpreparefuncargs 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 checkstackargread() without a caller frame.

On x86-64, KASAN reports the direct-call out-of-bounds copy as:

BUG: KASAN: slab-out-of-bounds in checkloadmem+0xb51/0xc60 Read of size 80 at addr ffff8881009af550 by task poc/131 Call Trace: checkstackargread at kernel/bpf/verifier.c:4234 (inlined by) checkloadmem at kernel/bpf/verifier.c:6645 docheckcommon at kernel/bpf/verifier.c:19568 bpfcheck at kernel/bpf/verifier.c:21318 bpfprogload 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 bpfgetspilledstackarg(), which validates the index against the caller's outstackargcnt and rejects uninitialized slots before copying the register state.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Validate stack-argument reads against the caller’s state, and reject callback subprograms with incoming stack arguments before their state is pushed.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:32 PM
Data Sourced
via MITRE·01:32 PM
Description

Frequently Asked Questions

1

What must an attacker be able to do to trigger this issue?

An attacker needs to submit a crafted BPF_PROG_LOAD program that creates an argument-count mismatch between a static subprogram's BTF-derived argument information and the caller's allocated outgoing stack-argument slots.

2

Are callback paths relevant to exposure?

Yes. Callback handling has a related argument-validation problem because the verifier can make incoming stack arguments readable from outgoing slots, while helper and kfunc callback ABIs pass at most five arguments at runtime.

3

How can I determine whether my kernel includes the resolution?

Check whether your kernel source or vendor patch set contains the stable commits referenced as 2baf358407edb426fc3c6d90e1df9ee9f88f8e07 and 90aedf8854c05713c02b381c41c59081b5cedbcc. No affected or fixed kernel version range is provided.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203