{"id":"CVE-2025-38607","state":"PUBLISHED","title":"bpf: handle jset (if a & b ...) as a jump in CFG computation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: handle jset (if a & b ...) as a jump in CFG computation\n\nBPF_JSET is a conditional jump and currently verifier.c:can_jump()\ndoes not know about that. This can lead to incorrect live registers\nand SCC computation.\n\nE.g. in the following example:\n\n   1: r0 = 1;\n   2: r2 = 2;\n   3: if r1 & 0x7 goto +1;\n   4: exit;\n   5: r0 = r2;\n   6: exit;\n\nW/o this fix insn_successors(3) will return only (4), a jump to (5)\nwould be missed and r2 won't be marked as alive at (3).","publishedAt":"2025-08-19T17:03:50.947Z","updatedAt":"2026-08-05T12:03:27.014Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"14c8552db64476ffc27c13dc6652fc0dac31c0ba","status":"affected","lessThan":"65eb166b8636365ad3d6e36d50a7c5edfe6cc66e","versionType":"git"},{"version":"14c8552db64476ffc27c13dc6652fc0dac31c0ba","status":"affected","lessThan":"261b30ad1516f4b9edd500aa6e8d6315c8fc109a","versionType":"git"},{"version":"14c8552db64476ffc27c13dc6652fc0dac31c0ba","status":"affected","lessThan":"3157f7e2999616ac91f4d559a8566214f74000a5","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.15.10","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.1","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]}],"references":["https://git.kernel.org/stable/c/65eb166b8636365ad3d6e36d50a7c5edfe6cc66e","https://git.kernel.org/stable/c/261b30ad1516f4b9edd500aa6e8d6315c8fc109a","https://git.kernel.org/stable/c/3157f7e2999616ac91f4d559a8566214f74000a5"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38607.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38607","state":"PUBLISHED","datePublished":"2025-08-19T17:03:50.947Z","dateUpdated":"2026-08-05T12:03:27.014Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.028Z"},"containers":{"cna":{"title":"bpf: handle jset (if a & b ...) as a jump in CFG computation","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: handle jset (if a & b ...) as a jump in CFG computation\n\nBPF_JSET is a conditional jump and currently verifier.c:can_jump()\ndoes not know about that. This can lead to incorrect live registers\nand SCC computation.\n\nE.g. in the following example:\n\n   1: r0 = 1;\n   2: r2 = 2;\n   3: if r1 & 0x7 goto +1;\n   4: exit;\n   5: r0 = r2;\n   6: exit;\n\nW/o this fix insn_successors(3) will return only (4), a jump to (5)\nwould be missed and r2 won't be marked as alive at (3)."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"14c8552db64476ffc27c13dc6652fc0dac31c0ba","status":"affected","lessThan":"65eb166b8636365ad3d6e36d50a7c5edfe6cc66e","versionType":"git"},{"version":"14c8552db64476ffc27c13dc6652fc0dac31c0ba","status":"affected","lessThan":"261b30ad1516f4b9edd500aa6e8d6315c8fc109a","versionType":"git"},{"version":"14c8552db64476ffc27c13dc6652fc0dac31c0ba","status":"affected","lessThan":"3157f7e2999616ac91f4d559a8566214f74000a5","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.15.10","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.1","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/65eb166b8636365ad3d6e36d50a7c5edfe6cc66e"},{"url":"https://git.kernel.org/stable/c/261b30ad1516f4b9edd500aa6e8d6315c8fc109a"},{"url":"https://git.kernel.org/stable/c/3157f7e2999616ac91f4d559a8566214f74000a5"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable analysis runs inside the BPF verifier, reached only through the local `bpf(BPF_PROG_LOAD)` syscall with attacker-supplied bytecode. There is no network or remote-peer component in the path.\nAC:L - The attacker fully authors the instruction stream, so emitting a `BPF_JSET` prune point whose taken-branch registers are wrongly marked dead is entirely deterministic. No race, timing window, or uncontrollable memory-layout condition is involved.\nPR:L - With the upstream default `CONFIG_BPF_UNPRIV_DEFAULT_OFF=n` (`sysctl_unprivileged_bpf_disabled == 0`), any unprivileged local user can load a socket-filter program and reach `compute_live_registers()`/`func_states_equal()`; otherwise `CAP_BPF`, commonly held by container and observability workloads, is enough. No real root in the init namespace is required.\nUI:N - The attacker loads and triggers its own BPF program end-to-end via the bpf() syscall. No victim action or cooperation is needed.\nS:U - The impact is confinement failure within the kernel's own security authority — an unprivileged process gains kernel-level memory access on the same host. No VM, IOMMU, or hypervisor boundary is crossed.\nC:H - Unsound pruning at the JSET checkpoint lets an unverified attacker-controlled pointer/scalar be used for loads on the taken branch, yielding arbitrary kernel memory read and disclosure of KASLR bases, credentials, and keys. The parallel SCC/precision defect provides a second route to the same leak.\nI:H - The same skipped-register comparison permits an unverified value to reach a store, giving an out-of-bounds kernel write primitive — the standard eBPF verifier-bypass path to overwriting `struct cred` or kernel text pointers and achieving full privilege escalation. Missing precision back-propagation on JSET loops compounds this.\nA:H - A program accepted with unverified register state performs wild kernel reads and writes, reliably producing oops, corruption, or panic. Complete kernel compromise likewise implies full loss of availability."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:03:27.014Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.15.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.16.1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}