CVE-2025-40061 | RDMA/rxe: Fix race in do_task() when draining

In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: Fix race in do_task() when draining When do_task() exhausts its iteration budget (!ret), it sets the state to TASK_STATE_IDLE to reschedule, without a secondary check on the current task->state. This can overwrite the TASK_STATE_DRAINING state set by a concurrent call to rxe_cleanup_task() or rxe_disable_task(). While state changes are protected by a spinlock, both rxe_cleanup_task() and rxe_disable_task() release the lock while waiting for the task to finish draining in the while(!is_done(task)) loop. The race occurs if do_task() hits its iteration limit and acquires the lock in this window. The cleanup logic may then proceed while the task incorrectly reschedules itself, leading to a potential use-after-free. This bug was introduced during the migration from tasklets to workqueues, where the special handling for the draining case was lost. Fix this by restoring the original pre-migration behavior. If the state is TASK_STATE_DRAINING when iterations are exhausted, set cont to 1 to force a new loop iteration. This allows the task to finish its work, so that a subsequent iteration can reach the switch statement and correctly transition the state to TASK_STATE_DRAINED, stopping the task as intended.

Published: 2025-10-28 Last update: 2026-06-17 Assigner: 416baaa9-dc9f-4396-8d5f-8c081fb06d67 Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Conclusion & alert: CVE-2025-40061 is rated Low Risk (5.9/100): low exploitation likelihood (EPSS 0.16%). Mandatory action: Low composite risk—no urgent action required; patch on your normal maintenance cycle and revisit priority if CVSS or EPSS increases.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-40061

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.02% 0.16% +0.14%
2 2025-10-28 0.02%

Full EPSS history (2 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-40061

CVSS metrics for this CVE.

No CVSS data in dataset for this CVE.

Weakness enumeration for CVE-2025-40061

OS Trackers for CVE-2025-40061

vendor priority summary link
debian unimportant CVE-2025-40061 unimportant priority: Debian including 1 source packages (linux), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2025-40061
redhat medium https://access.redhat.com/security/cve/CVE-2025-40061
suse medium CVE-2025-40061 severity moderate: SUSE including 487 source package names (13.2-6.19:libjitterentropy3-3.4.1-3.1, 13.2-6.19:libopenssl3-3.1.4-6.1, …), 1078 product×package rows across 220 product lines (Container suse/sl-micro/6.0/baremetal-os-container, Container suse/sl-micro/6.0/base-os-container, … (220 product lines)): Fixed 676, Known Affected 231, Known Not Affected 150, First Fixed 21. https://www.suse.com/security/cve/CVE-2025-40061/
ubuntu medium CVE-2025-40061 medium priority: Ubuntu including 157 source packages (linux, linux-allwinner-5.19, …), 1405 status rows across 9 suites (bionic, focal, jammy, noble, plucky, questing, trusty, upstream, xenial): DNE 1010, ignored 177, released 127, not-affected 82, needed 7, pending 2. https://ubuntu.com/security/CVE-2025-40061

Affected software / configurations for CVE-2025-40061

Vendor Product Version Raw CPE
linux linux_kernel >= 6.5, < 6.6.112 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 6.5, < 6.12.53 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 6.5, < 6.17.3 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 6.5, < 6.18 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

References for CVE-2025-40061

cvelogic Threat Intelligence