Cloudanix VulnDB

CVE-2025-38280

High · 7.8

CVSS

7.8

EPSS

0.2%

Published

Jul 10, 2025

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A Linux kernel bug can cause unexpected warnings when certain low-level programs fail to compile correctly, potentially affecting system stability on many servers and devices.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Full Compromise
Component
OS kernel
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

When BPF JIT compilation is requested but fails (e.g., due to fault injection when bpf_jit_enable=1 without CONFIG_BPF_JIT_ALWAYS_ON), the kernel incorrectly marks the program as valid and later invokes __bpf_prog_ret0_warn during execution in paths such as cls_bpf_classify, producing a WARN_ON_ONCE.

Why it matters to the business

Kernel warnings and potential instability can occur on systems running unprivileged or containerized BPF workloads, increasing operational noise, complicating debugging, and risking availability in network-heavy or security-monitoring environments; high ecosystem prevalence of the Linux kernel amplifies exposure across many deployments.

How an attack unfolds

An attacker with local access crafts a BPF program that forces JIT failure; when the program later executes in a classifier or similar hook, the mis-marked state triggers the warning path. Listed threat actors and campaigns exploiting related Linux kernel privilege-escalation issues indicate possible interest in chaining this for denial-of-service or further abuse.

How to fix it

Upgrade linux-lts (Alpaquita:stream) to 6.6.58-r0 or newer, linux-lts (Alpaquita:23) to 6.1.62-r0 or newer, and the mainline stable tree to commit e7fb4ebee6e900899d2b2e5852c3e2eafcbcad66 or equivalent backports; rebuild and reboot systems after applying the fixed kernel packages.

How to confirm the fix worked

Confirm the running kernel contains the referenced commit or package version; attempt to load BPF programs under bpf_jit_enable=1 with fault injection disabled and verify absence of the __bpf_prog_ret0_warn warning in dmesg or kernel logs.

Typical attack path

  1. Obtain local unprivileged or container access on a vulnerable kernel
  2. Enable or rely on bpf_jit_enable=1 without always-on JIT config
  3. Load a BPF program that triggers JIT failure via fault injection or size/complexity
  4. Attach the program to a hook (e.g., traffic classifier)
  5. Trigger execution to reach the warn path

How to detect it

Search kernel logs and dmesg for __bpf_prog_ret0_warn or the associated WARN_ON_ONCE stack trace involving bpf_dispatcher_nop_func and cls_bpf_classify; correlate with recent BPF program loads by untrusted users or containers; review audit logs for bpf syscall activity around the time of warnings.

What your security team should do

  • Prioritize kernel upgrades on all exposed systems within the CISA-style remediation window if applicable
  • Disable bpf_jit_enable or enforce CONFIG_BPF_JIT_ALWAYS_ON where JIT is required
  • Monitor kernel logs for __bpf_prog_ret0_warn occurrences as an interim detection measure
  • Review and restrict unprivileged BPF loading via sysctl or LSM policies

The record

In the Linux kernel, the following vulnerability has been resolved: bpf: Avoid __bpf_prog_ret0_warn when jit fails syzkaller reported an issue: WARNING: CPU: 3 PID: 217 at kernel/bpf/core.c:2357 __bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/core.c:2357 Modules linked in: CPU: 3 UID: 0 PID: 217 Comm: kworker/u32:6 Not tainted 6.15.0-rc4-syzkaller-00040-g8bac8898fe39 RIP: 0010:__bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/core.c:2357 Call Trace: <TASK> bpf_dispatcher_nop_func include/linux/bpf.h:1316 [inline] __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run include/linux/filter.h:725 [inline] cls_bpf_classify+0x74a/0x1110 net/sched/cls_bpf.c:105 ... When creating bpf program, 'fp->jit_requested' depends on bpf_jit_enable. This issue is triggered because of CONFIG_BPF_JIT_ALWAYS_ON is not set and bpf_jit_enable is set to 1, causing the arch to attempt JIT the prog, but jit failed due to FAULT_INJECTION. As a result, incorrectly treats the program as valid, when the program runs it calls `__bpf_prog_ret0_warn` and triggers the WARN_ON_ONCE(1).

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 No fix
Debian:12 linux 0 No fix
Debian:13 linux 0 6.12.35-1
Debian:14 linux 0 6.12.35-1
Linux Kernel 4.16.0 5.15.186
Mageia:9 kernel 0 6.6.101-1.mga9
Mageia:9 kernel-linus 0 6.6.101-1.mga9
Mageia:9 kmod-virtualbox 0 7.1.10-7.mga9
Mageia:9 kmod-xtables-addons 0 3.24-83.mga9
Mageia:9 wireless-regdb 0 20250710-1.mga9

Related vulnerabilities