# CVE-2025-38017: fs/eventpoll: fix endless busy loop after timeout has expired

> 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.24% (percentile 9, 2026-11-26)
- **Published:** 2025-06-18T09:28:25.790Z
- **Modified:** 2026-06-17T09:15:53.390Z

## Who should check

- Anyone running Linux \>= 99a0ad16dfd114a429df665065dcc576dad743c0, \< 7631dca012593c95d36199082546a24a0058fc50; \>= 0a65bc27bd645894175c059397b4916e31955fb2, \< d9ec73301099ec5975505e1c3effbe768bab9490
- Anyone running Linux \>= 6.14.4, \< 6.14.8

## Description

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

fs/eventpoll: fix endless busy loop after timeout has expired

After commit 0a65bc27bd64 ("eventpoll: Set epoll timeout if it's in
the future"), the following program would immediately enter a busy
loop in the kernel:

\`\`\`
int main() {
  int e = epoll\_create1(0);
  struct epoll\_event event = {.events = EPOLLIN};
  epoll\_ctl(e, EPOLL\_CTL\_ADD, 0, &event);
  const struct timespec timeout = {.tv\_nsec = 1};
  epoll\_pwait2(e, &event, 1, &timeout, 0);
}
\`\`\`

This happens because the given (non-zero) timeout of 1 nanosecond
usually expires before ep\_poll() is entered and then
ep\_schedule\_timeout() returns false, but \`timed\_out\` is never set
because the code line that sets it is skipped.  This quickly turns
into a soft lockup, RCU stalls and deadlocks, inflicting severe
headaches to the whole system.

When the timeout has expired, we don't need to schedule a hrtimer, but
we should set the \`timed\_out\` variable.  Therefore, I suggest moving
the ep\_schedule\_timeout() check into the \`timed\_out\` expression
instead of skipping it.

brauner: Note that there was an earlier fix by Joe Damato in response to
my bug report in \[1\].

## Affected and fixed versions

- Linux: \>= 99a0ad16dfd114a429df665065dcc576dad743c0, \< 7631dca012593c95d36199082546a24a0058fc50; \>= 0a65bc27bd645894175c059397b4916e31955fb2, \< d9ec73301099ec5975505e1c3effbe768bab9490 (cvelist)
- Linux: \>= 6.14.4, \< 6.14.8 (cvelist)

## Mitigation

- Upgrade Linux to 6.14.8 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-38017. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38017.md
Affected: Linux >= 99a0ad16dfd114a429df665065dcc576dad743c0, < 7631dca012593c95d36199082546a24a0058fc50; >= 0a65bc27bd645894175c059397b4916e31955fb2, < d9ec73301099ec5975505e1c3effbe768bab9490; Linux >= 6.14.4, < 6.14.8
Fixed in: Linux 7631dca012593c95d36199082546a24a0058fc50, Linux 6.14.8

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-38017 being exploited?

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

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

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

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

Linux \>= 99a0ad16dfd114a429df665065dcc576dad743c0, \< 7631dca012593c95d36199082546a24a0058fc50; \>= 0a65bc27bd645894175c059397b4916e31955fb2, \< d9ec73301099ec5975505e1c3effbe768bab9490; Linux \>= 6.14.4, \< 6.14.8.

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

Yes. Fixed in Linux 7631dca012593c95d36199082546a24a0058fc50, Linux 6.14.8. Upgrade Linux to 6.14.8 or later.

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

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/7631dca012593c95d36199082546a24a0058fc50>
- patch: <https://git.kernel.org/stable/c/d9ec73301099ec5975505e1c3effbe768bab9490>

## 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-38017>

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