LiveActive security incident?Get immediate response
CVE Record

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.

HighCVSS 7.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A race condition in Linux’s software RDMA transport can let cleanup continue while work is incorrectly rescheduled. This may cause use-after-free memory corruption, potentially allowing a locally authenticated user to crash the system or compromise kernel confidentiality and integrity.

Executive priority

Prioritize remediation on multi-user, compute, virtualization, or RDMA-enabled systems where untrusted local users have access. Treat other systems as scheduled high-severity patching after confirming RDMA/rxe exposure. There is no supplied evidence of active exploitation, so emergency internet-edge response is not currently supported.

Technical view

When RDMA/rxe do_task() exhausts its iteration budget, it can overwrite TASK_STATE_DRAINING with TASK_STATE_IDLE during an unlocked cleanup waiting period. The task may then reschedule after cleanup proceeds, creating a potential use-after-free. The fix preserves draining, forces another iteration, and transitions correctly to TASK_STATE_DRAINED.

Likely exposure

Exposure requires an affected Linux kernel and use of the RDMA/rxe code path. The supplied record identifies Linux versions including 6.5, 6.6.112, 6.12.53, 6.17.3, and 6.18, but its version formatting is ambiguous. Confirm exact affected ranges and downstream backports with the distribution vendor.

Exploitation context

The CVSS 3.1 score is 7.8 with local access and low privileges required. Successful exploitation could affect confidentiality, integrity, and availability at kernel scope. The source bundle marks this CVE as absent from KEV and provides no evidence of active exploitation or a public exploit.

Researcher notes

The vulnerability is a task-state synchronization flaw introduced during migration from tasklets to workqueues. Spinlocks protect individual state changes, but cleanup and disable paths release the lock while polling for draining completion. The supplied data does not identify a CWE or provide sufficiently clear version ranges; validate ancestry and stable backports directly.

Mitigation direction

  • Upgrade to a supported vendor kernel containing the applicable RDMA/rxe stable fix.
  • Check distribution advisories for exact affected and fixed package versions.
  • Prioritize systems where RDMA/rxe is enabled or operationally used.
  • Apply normal kernel-update safeguards, including reboot and rollback planning.

Validation and detection

  • Inventory running kernel versions across Linux systems.
  • Determine whether affected systems use the RDMA/rxe subsystem.
  • Verify the vendor package includes the referenced fix or an equivalent backport.
  • After updating and rebooting, confirm the fixed kernel is running.
  • Review kernel telemetry for crashes or memory-safety faults involving RDMA/rxe.
Prepared
Confidence
high
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2025-40061 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
0ADP providers
5Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9Linux

Vulnerability scoring details

Base CVSS 3.1 score

7.8High
CVSS 3.1 vector shape for CVE-2025-40061Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux9b4b7c1f9f54120940e243251e2b1407767b3381, 9b4b7c1f9f54120940e243251e2b1407767b3381, 9b4b7c1f9f54120940e243251e2b1407767b3381, 9b4b7c1f9f54120940e243251e2b1407767b3381unaffected
LinuxLinux6.5, 0, 6.6.112, 6.12.53, 6.17.3, 6.18affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.