VDB

CVE-2025-39748

CVE-2025-39748 PUBLISHED

bpf: Forget ranges when refining tnum after JSET

Reported by linux · Published September 11, 2025

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-headersAmazon Linux1:6.1.168-202.320.amzn2023
kernel6.12-toolsAmazon Linux1:6.12.46-66.121.amzn2023
kernel-tools-develAmazon Linux1:6.1.168-202.320.amzn2023
kernel6.12-develAmazon Linux1:6.12.46-66.121.amzn2023
perfAmazon Linux1:6.1.168-202.320.amzn2023
kernel-libbpf-staticAmazon Linux1:6.1.168-202.320.amzn2023
kernel-livepatch-6.12.46-66.121Amazon Linux1:1.0-0.amzn2023
kernel-livepatch-6.1.168-202.320Amazon Linux1:1.0-0.amzn2023
kernel-modules-extra-commonAmazon Linux1:6.1.168-202.320.amzn2023
kernel6.12-modules-extra-commonAmazon Linux1:6.12.46-66.121.amzn2023
python3-perf6.12Amazon Linux1:6.12.46-66.121.amzn2023
kernel6.12-tools-develAmazon Linux1:6.12.46-66.121.amzn2023

7 more packages have a fixed version. See every fix in Lookup.

Affected products

VendorProductVersions
LinuxLinux960ea056561a08e2b837b2f02d22c53226414a84, 960ea056561a08e2b837b2f02d22c53226414a84, 960ea056561a08e2b837b2f02d22c53226414a84
LinuxLinux5.0, 0, 5.10.253
amazon:2023kernel-headers0
amazon:2023kernel6.12-tools0
amazon:2023kernel-tools-devel0
amazon:2023kernel6.12-devel0
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP3.1.7, 3.1.5, 3.1.6
amazon:2023perf0
amazon:2023kernel-libbpf-static0
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0)3.1.7, 3.1.6, 3.1.5
amazon:2023kernel-livepatch-6.12.46-66.1210
amazon:2023kernel-livepatch-6.1.168-202.3200
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0)3.1.7, 3.1.5, 3.1.6
amazon:2023kernel-modules-extra-common0
amazon:2023kernel6.12-modules-extra-common0
amazon:2023python3-perf6.120
amazon:2023kernel6.12-tools-devel0
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0)3.1.6, 3.1.7, 3.1.5
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP3.1.5, 3.1.7, 3.1.6
amazon:2023kernel6.12-libbpf-static0

…and 21 more

Timeline

  • Sep 11, 2025 Coalition ESS Score (11 in total, the first dated here)
  • Sep 11, 2025 CVE Published
  • Sep 12, 2025 EPSS Score (30 in total, the first dated here)
  • Oct 12, 2025 PoC Published (9 in total, the first dated here)
  • Dec 15, 2025 Security Advisory (188 in total, the first dated here)
  • Mar 29, 2026 Distribution Patch (175 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-39748
vulnetix vdb fixes CVE-2025-39748

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-39748/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›