VYPR
Medium severity5.5NVD Advisory· Published Sep 11, 2025· Updated Apr 18, 2026

CVE-2025-39748

CVE-2025-39748

Description

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

bpf: Forget ranges when refining tnum after JSET

Syzbot reported a kernel warning due to a range invariant violation on the following BPF program.

0: call bpf_get_netns_cookie 1: if r0 == 0 goto 2: if r0 & Oxffffffff goto

The issue is on the path where we fall through both jumps.

That path is unreachable at runtime: after insn 1, we know r0 != 0, but with the sign extension on the jset, we would only fallthrough insn 2 if r0 == 0. Unfortunately, is_branch_taken() isn't currently able to figure this out, so the verifier walks all branches. The verifier then refines the register bounds using the second condition and we end up with inconsistent bounds on this unreachable path:

1: if r0 == 0 goto r0: u64=[0x1, 0xffffffffffffffff] var_off=(0, 0xffffffffffffffff) 2: if r0 & 0xffffffff goto r0 before reg_bounds_sync: u64=[0x1, 0xffffffffffffffff] var_off=(0, 0) r0 after reg_bounds_sync: u64=[0x1, 0] var_off=(0, 0)

Improving the range refinement for JSET to cover all cases is tricky. We also don't expect many users to rely on JSET given LLVM doesn't generate those instructions. So instead of improving the range refinement for JSETs, Eduard suggested we forget the ranges whenever we're narrowing tnums after a JSET. This patch implements that approach.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In the Linux kernel, a BPF verifier bug in JSET handling could cause inconsistent register bounds on unreachable paths, leading to a kernel warning.

Vulnerability

CVE-2025-39748 is a vulnerability in the Linux kernel's BPF verifier, specifically in the handling of JSET (jump if set) instructions. The issue arises when the verifier refines register bounds after a JSET condition, potentially creating inconsistent bounds on an unreachable path, leading to a range invariant violation and a kernel warning. The root cause is that the verifier's range refinement for JSET does not account for all cases, particularly when combined with a prior equality check.

Exploitation

To trigger this vulnerability, an attacker would need to craft a BPF program that includes a sequence of conditional jumps: first an equality check (e.g., if r0 == 0), followed by a JSET check (e.g., if r0 & 0xffffffff). The verifier incorrectly analyzes the unreachable path where both conditions are false, leading to inconsistent register bounds. This requires the ability to load and execute a BPF program, which typically requires privileged access (CAP_BPF or root). The attack surface is limited to systems where unprivileged BPF is enabled or where an attacker has already gained sufficient privileges.

Impact

An attacker exploiting this vulnerability could cause a kernel warning (WARN_ON), potentially leading to a denial of service (system crash or hang) due to the kernel's panic-on-warn behavior. The CVSS v3 score is 5.5 (Medium), indicating a moderate severity. There is no evidence of privilege escalation or data corruption beyond the denial-of-service condition.

Mitigation

The fix, implemented in Linux kernel commits [1][2][3], takes a conservative approach: instead of improving the range refinement for JSET (which is complex and rarely used by LLVM), the patch forgets the register ranges whenever the tnum (ternary number) is narrowed after a JSET. This prevents the inconsistent bounds from being propagated. Users should apply the latest stable kernel updates to address this issue.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

6

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.