Skip to main content

Linux Kernel CVE-2025-40061

HIGH
2025-10-28 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.8
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Share

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY
7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
7.0 HIGH

Local access with low privileges to the rxe device (AV:L/PR:L); winning the drain timing race is non-deterministic so AC:H; UAF yields full memory-corruption impact (C/I/A:H).

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Red Hat
6.5 MEDIUM
qualitative

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Jul 30, 2026 - 07:49 vuln.today
CVE Published
Oct 28, 2025 - 12:15 cve.org
HIGH 7.8

DescriptionCVE.org

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.

AnalysisAI

Local privilege escalation via use-after-free in the Linux kernel's RDMA/rxe (Soft-RoCE) driver allows a low-privileged local user to corrupt kernel memory by winning a race in do_task(). When the task loop exhausts its iteration budget it blindly resets state to TASK_STATE_IDLE, overwriting a concurrent TASK_STATE_DRAINING set during rxe_cleanup_task()/rxe_disable_task() teardown, so a task reschedules against freed structures. No public exploit identified at time of analysis and EPSS is low (0.19%, 9th percentile), consistent with a hard-to-win kernel race rather than a mass-exploited flaw.

Technical ContextAI

The affected component is the Soft-RoCE (rxe) driver in the kernel's InfiniBand/RDMA subsystem, which emulates RDMA verbs over ordinary Ethernet. The rxe task scheduler (do_task) processes send/receive/completion work in bounded iterations and, when its budget is exhausted, reschedules itself. The root cause is a classic concurrency defect: a state-machine transition that fails to re-check the current task->state before writing it. Although a spinlock guards state changes, rxe_cleanup_task() and rxe_disable_task() drop the lock while polling is_done() during drain, opening a window in which do_task() overwrites TASK_STATE_DRAINING. The result is a use-after-free (CWE-416) driven by a race condition (CWE-362); the NVD CWE field is unpopulated (N/A) and the vendor-supplied tag 'Information Disclosure' understates the C:H/I:H/A:H memory-corruption impact. The regression was introduced when rxe migrated from tasklets to workqueues and the drain special-casing was dropped.

Affected ProductsAI

The affected product is the mainline and stable Linux kernel, specifically the RDMA/rxe (Soft-RoCE) driver (drivers/infiniband/sw/rxe). Exact affected version ranges are not enumerated in the provided NVD data and no CPE strings were supplied; the four git.kernel.org stable references (commits 52edccfb555142678c836c285bf5b4ec760bd043, 660b6959c4170637f5db2279d1f71af33a49e49b, 85288bcf7ffe11e7b036edf91937bc62fd384076, and 8ca7eada62fcfabf6ec1dc7468941e791c1d8729) correspond to the fix backported across multiple stable branches. The bug was introduced by the tasklet-to-workqueue migration in rxe, so kernels containing that migration up to the fixed commits are affected; consult the individual stable commit trees to map exact fixed versions per branch.

RemediationAI

Upstream fix available (commits/backports); a specific released tag is not stated in the provided data, so update to the fixed stable kernel that carries commit 660b6959c4170637f5db2279d1f71af33a49e49b (and its siblings 52edccfb..., 85288bcf..., 8ca7eada...) for your branch via your distribution's kernel update channel. The fix restores pre-migration behavior by forcing a continued loop iteration when state is TASK_STATE_DRAINING so the task drains to TASK_STATE_DRAINED correctly. Where immediate patching is not possible, the most effective compensating control is to prevent the vulnerable code from loading: blacklist/unload the rdma_rxe module (e.g., ensure it is not auto-loaded and 'rmmod rdma_rxe' where no RDMA emulation is needed), which fully removes the attack surface but disables Soft-RoCE for any workload relying on it. If rxe is required, restrict local access and avoid untrusted local users on the host, since exploitation requires local low-privileged access. Refer to the git.kernel.org stable references above for the authoritative patch.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
Container suse/hpc/warewulf4-x86_64/sle-hpc-node:15.6.17.8.134 Image SLES15-SP6 Image SLES15-SP6-BYOS Image SLES15-SP6-BYOS-Azure Image SLES15-SP6-BYOS-EC2 Image SLES15-SP6-BYOS-GCE Image SLES15-SP6-CHOST-BYOS Image SLES15-SP6-CHOST-BYOS-Aliyun Image SLES15-SP6-CHOST-BYOS-Azure Image SLES15-SP6-CHOST-BYOS-EC2 Image SLES15-SP6-CHOST-BYOS-GCE Image SLES15-SP6-CHOST-BYOS-GDC Image SLES15-SP6-CHOST-BYOS-SAP-CCloud Image SLES15-SP6-EC2 Image SLES15-SP6-EC2-ECS-HVM Image SLES15-SP6-GCE Image SLES15-SP6-HPC-BYOS Image SLES15-SP6-HPC-BYOS-Azure Image SLES15-SP6-HPC-BYOS-EC2 Image SLES15-SP6-HPC-BYOS-GCE Image SLES15-SP6-HPC-EC2 Image SLES15-SP6-HPC-GCE Image SLES15-SP6-Hardened-BYOS Image SLES15-SP6-Hardened-BYOS-Azure Image SLES15-SP6-Hardened-BYOS-EC2 Image SLES15-SP6-Hardened-BYOS-GCE Image SLES15-SP6-SAP Image SLES15-SP6-SAP-Azure Image SLES15-SP6-SAP-EC2 Image SLES15-SP6-SAP-GCE Image SLES15-SP6-SAPCAL Image SLES15-SP6-SAPCAL-Azure Image SLES15-SP6-SAPCAL-EC2 Image SLES15-SP6-SAPCAL-GCE Affected
Container suse/sl-micro/6.0/baremetal-os-container:latest Container suse/sl-micro/6.0/toolbox:latest Affected
Container suse/sl-micro/6.0/base-os-container:2.1.3-7.65 Image SLE-Micro Image SLE-Micro-Azure Image SLE-Micro-BYOS Image SLE-Micro-BYOS-Azure Image SLE-Micro-BYOS-EC2 Image SLE-Micro-BYOS-GCE Image SLE-Micro-EC2 Image SLE-Micro-GCE Affected
Container suse/sl-micro/6.0/kvm-os-container:2.1.3-6.88 Affected
Container suse/sl-micro/6.0/rt-os-container:2.1.3-7.105 Affected

Share

CVE-2025-40061 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy