CVE-2025-40061
BaseFortify
Publication date: 2025-10-28
Last updated on: 2025-10-30
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a race condition in the Linux kernel's RDMA/rxe component related to the do_task() function when draining tasks. When do_task() exhausts its iteration budget, it sets the task state to TASK_STATE_IDLE without checking if the task is in TASK_STATE_DRAINING, which can be set by concurrent cleanup or disable calls. Because the cleanup logic releases a lock while waiting for the task to finish draining, do_task() can reschedule the task prematurely, leading to a potential use-after-free error. This issue arose from a migration from tasklets to workqueues where special handling for draining was lost. The fix restores the original behavior by forcing additional iterations if the task is draining, ensuring proper state transitions and preventing premature rescheduling.
How can this vulnerability impact me? :
This vulnerability can lead to a use-after-free condition in the Linux kernel's RDMA/rxe subsystem, which may cause system instability, crashes, or potentially allow an attacker to execute arbitrary code or escalate privileges if they can trigger the race condition. It affects the reliability and security of systems using RDMA over Converged Ethernet (RoCE) with the rxe driver.
What immediate steps should I take to mitigate this vulnerability?
Apply the patch or update to the fixed Linux kernel version that restores the original pre-migration behavior in the RDMA/rxe do_task() function. This fix ensures that if the task state is TASK_STATE_DRAINING when iterations are exhausted, the task will complete properly, preventing the race condition and potential use-after-free. Until the patch is applied, avoid using affected RDMA/rxe functionality in environments where this race condition could be exploited.