# CVE-2025-40143: bpf: dont report verifier bug for missing bpf_scc_visit on speculative path

> A local attacker can trigger a kernel verifier bug via a crafted BPF program, causing a denial of service.

- **Severity:** Not scored
- **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:** Yes
- **Published:** 12 Nov 2025
- **Updated:** 11 May 2026
- **Also known as:** BELL-CVE-2025-40143, GHSA-fv7m-5jq2-37ch, UBUNTU-CVE-2025-40143

## What is CVE-2025-40143?

CVE-2025-40143 is a denial of service vulnerability in Linux, published on 12 Nov 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: dont report verifier bug for missing bpf_scc_visit on speculative path

Syzbot generated a program that triggers a verifier_bug() call in
maybe_exit_scc(). maybe_exit_scc() assumes that, when called for a
state with insn_idx in some SCC, there should be an instance of struct
bpf_scc_visit allocated for that SCC. Turns out the assumption does
not hold for speculative execution paths. See example in the next
patch.

maybe_scc_exit() is called from update_branch_counts() for states that
reach branch count of zero, meaning that path exploration for a
particular path is finished. Path exploration can finish in one of
three ways:
a. Verification error is found. In this case, update_branch_counts()
   is called only for non-speculative paths.
b. Top level BPF_EXIT is reached. Such instructions are never a part of
   an SCC, so compute_scc_callchain() in maybe_scc_exit() will return
   false, and maybe_scc_exit() will return early.
c. A checkpoint is reached and matched. Checkpoints are created by
   is_state_visited(), which calls maybe_enter_scc(), which allocates
   bpf_scc_visit instances for checkpoints within SCCs.

Hence, for non-speculative symbolic execution paths, the assumption
still holds: if maybe_scc_exit() is called for a state within an SCC,
bpf_scc_visit instance must exist.

This patch removes the verifier_bug() call for speculative paths.

## Which versions are affected by CVE-2025-40143?


## How do I fix CVE-2025-40143?

Apply the vendor's patch.

## Is CVE-2025-40143 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-40143 and fix it if it is affected.

What it is: CVE-2025-40143 is a denial of service vulnerability in Linux, published on 12 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-40143 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-40143/ (Markdown: https://insights.sbomify.com/CVE-2025-40143/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-40143
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-40143
- OSV: https://osv.dev/vulnerability/CVE-2025-40143

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-40143/
Summaries are generated and may contain mistakes; the official description above is the record.
