Bug 2589945 (CVE-2026-143364) - CVE-2026-143364 kernel: kernel: eBPF: Out-of-bounds memory write via improper stack trace validation
Summary: CVE-2026-143364 kernel: kernel: eBPF: Out-of-bounds memory write via improper...
Keywords:
Status: NEW
Alias: CVE-2026-143364
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-12-03 09:54 UTC by OSIDB Bzimport
Modified: 2026-12-03 12:06 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-12-03 09:54:16 UTC
In the Linux kernel, the following vulnerability has been resolved:

bpf: Clamp the trace length before the skip test in stackid_init()

stackid_init() gives a bucket of the stack map
min(trace_nr - skip, max_depth - skip) trace entries. Here max_depth is the
size of a bucket plus skip, but at most perf_event_max_stack. Context
markers can make trace_nr larger than that, so the skip test can pass when
max_depth < skip. Then 'max_depth - skip' wraps, and the kernel can write
after the bucket.

Clamp trace_nr to max_depth before the skip test, as __bpf_get_stack_pe()
does. The result changes only when skip >= max_depth. Then it is -EFAULT.
Until now skip == max_depth could give the id of an empty trace.

get_perf_callchain() releases the trace, so an NMI can change trace->nr.
Use READ_ONCE() in bpf_get_stackid(), so the compiler reads it one time.


Note You need to log in before you can comment on or make changes to this bug.