CVE-2025-39748 bpf: Forget ranges when refining tnum after JSET

Medium 5.5 Published Updated

A flaw in the Linux kernel BPF verifier allows a local attacker to trigger a kernel warning and potential denial of service via specific BPF programs.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-39748?

CVE-2025-39748 is a medium-severity denial of service vulnerability in Linux kernel, published on 11 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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 <exit> 2: if r0 & Oxffffffff goto <exit>

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 <exit> r0: u64=[0x1, 0xffffffffffffffff] var_off=(0, 0xffffffffffffffff) 2: if r0 & 0xffffffff goto <exit> 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.

Which versions are affected by CVE-2025-39748?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-39748?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-39748 being exploited?

There is no known exploitation of CVE-2025-39748 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-67208, AZL-70819, BELL-CVE-2025-39748, DEBIAN-CVE-2025-39748, GHSA-v488-2vhj-rwrj, ROOT-OS-DEBIAN-11-CVE-2025-39748 and 4 more.

Is CVE-2025-39748 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free