fs/eventpoll: fix endless busy loop after timeout has expired
Published Jun 18, 2025
5.5
MEDIUMCVSS 3.1
EPSS 0.16%
Description
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 products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 6.14.4StatusaffectedConstraints<6.14.8
- Version
- ≥ 6.14.4 · < 6.14.8
- 6.15
- 6.15
- 6.15
- 6.15
No data.
Red Hat Enterprise Linux 10
kernel
Out of support scope
Red Hat Enterprise Linux 6
kernel
Out of support scope
Red Hat Enterprise Linux 7
kernel
Out of support scope
Red Hat Enterprise Linux 7
kernel-rt
Out of support scope
Red Hat Enterprise Linux 8
kernel
Out of support scope
Red Hat Enterprise Linux 8
kernel-rt
Out of support scope
Red Hat Enterprise Linux 9
kernel
Out of support scope
Red Hat Enterprise Linux 9
kernel-rt
Out of support scope
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | kernel | Out of support scope | n/a |
| Red Hat Enterprise Linux 6 | kernel | Out of support scope | n/a |
| Red Hat Enterprise Linux 7 | kernel | Out of support scope | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Out of support scope | n/a |
| Red Hat Enterprise Linux 8 | kernel | Out of support scope | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Out of support scope | n/a |
| Red Hat Enterprise Linux 9 | kernel | Out of support scope | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Out of support scope | n/a |
No package ranges for this CVE.
Remediation
Red Hat mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
1 other source (Red Hat) ▾
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 2, 2026.
Score over time
2025–2026- EPSS v4
- EPSS v5
Percentile over time
- EPSS v4
- EPSS v5
Table of values (3 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 2, 2026 | 0.16% (0.00159) | 4.44th | v5 (v2026.06.15) |
| Jun 15, 2026 | 0.14% (0.00137) | 3.37th | v5 (v2026.06.15) |
| Jun 18, 2025 | 0.02% (0.00018) | 3.07th | v4 (v2025.03.14) |
References (7)
- https://access.redhat.com/security/cve/CVE-2025-38017 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2373374 Issue Tracking
- https://git.kernel.org/stable/c/7631dca012593c95d36199082546a24a0058fc50 Patch
- https://git.kernel.org/stable/c/d9ec73301099ec5975505e1c3effbe768bab9490 Patch
- https://lore.kernel.org/linux-cve-announce/2025061844-CVE-2025-38017-16a2@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2025-38017
- https://www.cve.org/CVERecord?id=CVE-2025-38017
Change history (0)
No recorded changes yet.