CVE-2025-39748
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-headers | Amazon Linux | 1:6.1.168-202.320.amzn2023 |
| kernel6.12-tools | Amazon Linux | 1:6.12.46-66.121.amzn2023 |
| kernel-tools-devel | Amazon Linux | 1:6.1.168-202.320.amzn2023 |
| kernel6.12-devel | Amazon Linux | 1:6.12.46-66.121.amzn2023 |
| perf | Amazon Linux | 1:6.1.168-202.320.amzn2023 |
| kernel-libbpf-static | Amazon Linux | 1:6.1.168-202.320.amzn2023 |
| kernel-livepatch-6.12.46-66.121 | Amazon Linux | 1:1.0-0.amzn2023 |
| kernel-livepatch-6.1.168-202.320 | Amazon Linux | 1:1.0-0.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 1:6.1.168-202.320.amzn2023 |
| kernel6.12-modules-extra-common | Amazon Linux | 1:6.12.46-66.121.amzn2023 |
| python3-perf6.12 | Amazon Linux | 1:6.12.46-66.121.amzn2023 |
| kernel6.12-tools-devel | Amazon Linux | 1:6.12.46-66.121.amzn2023 |
7 more packages have a fixed version. See every fix in Lookup.
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 960ea056561a08e2b837b2f02d22c53226414a84, 960ea056561a08e2b837b2f02d22c53226414a84, 960ea056561a08e2b837b2f02d22c53226414a84 |
| Linux | Linux | 5.0, 0, 5.10.253 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel6.12-devel | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | 3.1.7, 3.1.5, 3.1.6 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) | 3.1.7, 3.1.6, 3.1.5 |
| amazon:2023 | kernel-livepatch-6.12.46-66.121 | 0 |
| amazon:2023 | kernel-livepatch-6.1.168-202.320 | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) | 3.1.7, 3.1.5, 3.1.6 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel6.12-tools-devel | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) | 3.1.6, 3.1.7, 3.1.5 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | 3.1.5, 3.1.7, 3.1.6 |
| amazon:2023 | kernel6.12-libbpf-static | 0 |
…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