# CVE-2025-37940: ftrace: Add cond\_resched() to ftrace\_graph\_set\_hash()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.22% (percentile 8, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-05-20T15:58:17.634Z
- **Modified:** 2026-11-05T21:17:58.823Z

## Who should check

- Anyone running Linux \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< e5b4ae6f01d4a510d5725eca7254519a1093920d; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 618655d54c5f8af5d57b77491d08c0f0ff77d114; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< dd38803c9088b848c6b56f4f6d7efc4497bfde61; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 8dd7d7280357596ba63dfdb4c1725d9dd24bd42a; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 5d336ac215e5c76e43ef4bca9ba699835e53e2fd; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 1fce9574b9d515bcb8a75379a8053e18602424e3; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 4429535acab750d963fdc3dfcc9e0eee42f4d599; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 72be43ff061a889c6ee648a330a42486cafa15a6; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 42ea22e754ba4f2b86f8760ca27f6f71da2d982c
- Anyone running Linux 4.11

## Description

In the Linux kernel, the following vulnerability has been resolved:

ftrace: Add cond\_resched() to ftrace\_graph\_set\_hash()

When the kernel contains a large number of functions that can be traced,
the loop in ftrace\_graph\_set\_hash() may take a lot of time to execute.
This may trigger the softlockup watchdog.

Add cond\_resched() within the loop to allow the kernel to remain
responsive even when processing a large number of functions.

This matches the cond\_resched() that is used in other locations of the
code that iterates over all functions that can be traced.

## Affected and fixed versions

- Linux: \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< e5b4ae6f01d4a510d5725eca7254519a1093920d; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 618655d54c5f8af5d57b77491d08c0f0ff77d114; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< dd38803c9088b848c6b56f4f6d7efc4497bfde61; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 8dd7d7280357596ba63dfdb4c1725d9dd24bd42a; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 5d336ac215e5c76e43ef4bca9ba699835e53e2fd; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 1fce9574b9d515bcb8a75379a8053e18602424e3; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 4429535acab750d963fdc3dfcc9e0eee42f4d599; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 72be43ff061a889c6ee648a330a42486cafa15a6; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 42ea22e754ba4f2b86f8760ca27f6f71da2d982c (cvelist)
- Linux: 4.11 (cvelist)

## Mitigation

- Upgrade Linux to 42ea22e754ba4f2b86f8760ca27f6f71da2d982c or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-37940. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-37940.md
Affected: Linux >= b9b0c831bed2682c2e3e9f5420fb6985549ef020, < e5b4ae6f01d4a510d5725eca7254519a1093920d; >= b9b0c831bed2682c2e3e9f5420fb6985549ef020, < 618655d54c5f8af5d57b77491d08c0f0ff77d114; >= b9b0c831bed2682c2e3e9f5420fb6985549ef020, < dd38803c9088b848c6b56f4f6d7efc4497bfde61; >= b9b0c831bed2682c2e3e9f5…
Fixed in: Linux 618655d54c5f8af5d57b77491d08c0f0ff77d114, Linux 8dd7d7280357596ba63dfdb4c1725d9dd24bd42a, Linux 5d336ac215e5c76e43ef4bca9ba699835e53e2fd, Linux 1fce9574b9d515bcb8a75379a8053e18602424e3, Linux 4429535acab750d963fdc3dfcc9e0eee42f4d599, Linux 72be43ff061a889c6ee648a330a42486cafa15a6, Linux 42ea2…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-37940 being exploited?

There is no confirmed exploitation: CVE-2025-37940 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-37940?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< e5b4ae6f01d4a510d5725eca7254519a1093920d; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 618655d54c5f8af5d57b77491d08c0f0ff77d114; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< dd38803c9088b848c6b56f4f6d7efc4497bfde61; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 8dd7d7280357596ba63dfdb4c1725d9dd24bd42a; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 5d336ac215e5c76e43ef4bca9ba699835e53e2fd; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 1fce9574b9d515bcb8a75379a8053e18602424e3; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 4429535acab750d963fdc3dfcc9e0eee42f4d599; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 72be43ff061a889c6ee648a330a42486cafa15a6; \>= b9b0c831bed2682c2e3e9f5420fb6985549ef020, \< 42ea22e754ba4f2b86f8760ca27f6f71da2d982c; Linux 4.11.

### Is there a fix for CVE-2025-37940?

Yes. Fixed in Linux 618655d54c5f8af5d57b77491d08c0f0ff77d114, Linux 8dd7d7280357596ba63dfdb4c1725d9dd24bd42a, Linux 5d336ac215e5c76e43ef4bca9ba699835e53e2fd, Linux 1fce9574b9d515bcb8a75379a8053e18602424e3, Linux 4429535acab750d963fdc3dfcc9e0eee42f4d599, Linux 72be43ff061a889c6ee648a330a42486cafa15a6, Linux 42ea22e754ba4f2b86f8760ca27f6f71da2d982c. Upgrade Linux to 42ea22e754ba4f2b86f8760ca27f6f71da2d982c or later.

### How do I check if I'm affected by CVE-2025-37940?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/e5b4ae6f01d4a510d5725eca7254519a1093920d>
- patch: <https://git.kernel.org/stable/c/618655d54c5f8af5d57b77491d08c0f0ff77d114>
- patch: <https://git.kernel.org/stable/c/dd38803c9088b848c6b56f4f6d7efc4497bfde61>
- patch: <https://git.kernel.org/stable/c/8dd7d7280357596ba63dfdb4c1725d9dd24bd42a>
- patch: <https://git.kernel.org/stable/c/5d336ac215e5c76e43ef4bca9ba699835e53e2fd>
- patch: <https://git.kernel.org/stable/c/1fce9574b9d515bcb8a75379a8053e18602424e3>
- patch: <https://git.kernel.org/stable/c/4429535acab750d963fdc3dfcc9e0eee42f4d599>
- patch: <https://git.kernel.org/stable/c/72be43ff061a889c6ee648a330a42486cafa15a6>
- patch: <https://git.kernel.org/stable/c/42ea22e754ba4f2b86f8760ca27f6f71da2d982c>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-37940>

HTML: <https://flawdb.com/CVE-2025-37940> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-37940>
