CVE-2025-22087

bpf: Fix array bounds error with may_goto

HIGH
7.1
CVSS Score
Published: April 16, 2025 at 02:12 PM UTC
Updated: August 5, 2026 at 12:44 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.1
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix array bounds error with may_goto may_goto uses an additional 8 bytes on the stack, which causes the interpreters[] array to go out of bounds when calculating index by stack_size. 1. If a BPF program is rewritten, re-evaluate the stack size. For non-JIT cases, reject loading directly. 2. For non-JIT cases, calculating interpreters[idx] may still cause out-of-bounds array access, and just warn about it. 3. For jit_requested cases, the execution of bpf_func also needs to be warned. So move the definition of function __bpf_prog_ret0_warn out of the macro definition CONFIG_BPF_JIT_ALWAYS_ON.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.13 ≤ v < 6.13.116.14 ≤ v < 6.14.26.9 ≤ v < 6.12.236.9 ≤ v < 6.13.116.9 ≤ v < 6.14.26.9 ≤ v < 6.1511832b97b311bb9e3c27945bc0d1089a14209c96.9
Vendor states this is fixed in 19e6817f84000d0b06f09fd69ebd56217842c122 (fixed)
Vendor states this is fixed in 1a86ae57b2600e5749f5f674e9d4296ac00c69a8 (fixed)
Vendor states this is fixed in 4524b7febdd55fb99ae2e1f48db64019fa69e643 (fixed)
Vendor states this is fixed in 6ebc5030e0c5a698f1dd9a6684cddf6ccaed64a0 (fixed)
Vendor states this is fixed in 6.12.23 (unaffected)
Vendor states this is fixed in 6.13.11 (unaffected)
Vendor states this is fixed in 6.14.2 (unaffected)
Vendor states this is fixed in 6.15 (unaffected)
Vendor states this is fixed in 6.9 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/19e6817f84000d0b06f09fd69ebd56217842c122
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1a86ae57b2600e5749f5f674e9d4296ac00c69a8
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4524b7febdd55fb99ae2e1f48db64019fa69e643
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6ebc5030e0c5a698f1dd9a6684cddf6ccaed64a0

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-125

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card