Vulnerability · Published Feb 27, 2025 · Assigned by Linux
CVE-2025-21732RDMA/mlx5: Fix a race for an ODP MR which leads to CQE with error
Medium 4.7
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 3% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: RDMA/mlx5: Fix a race for an ODP MR which leads to CQE with error This patch addresses a race condition for an ODP MR that can result in a CQE with an error on the UMR QP. During the __mlx5_ib_dereg_mr() flow, the following sequence of calls occurs: mlx5_revoke_mr() mlx5r_umr_revoke_mr() mlx5r_umr_post_send_wait() At this point, the lkey is freed from the hardware's perspective. However, concurrently, mlx5_ib_invalidate_range() might be triggered by another task attempting to invalidate a range for the same freed lkey. This task will: - Acquire the umem_odp->umem_mutex lock. - Call mlx5r_umr_update_xlt() on the UMR QP. - Since the lkey has already been freed, this can lead to a CQE error, causing the UMR QP to enter an error state [1]. To resolve this race condition, the umem_odp->umem_mutex lock is now also acquired as part of the mlx5_revoke_mr() scope. Upon successful revoke, we set umem_odp->private which points to that MR to NULL, preventing any further invalidation attempts on its lkey. [1] From dmesg: infiniband rocep8s0f0: dump_cqe:277:(pid 0): WC error: 6, Message: memory bind operation error cqe_dump: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cqe_dump: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cqe_dump: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cqe_dump: 00000030: 00 00 00 00 08 00 78 06 25 00 11 b9 00 0e dd d2 WARNING: CPU: 15 PID: 1506 at drivers/infiniband/hw/mlx5/umr.c:394 mlx5r_umr_post_send_wait+0x15a/0x2b0 [mlx5_ib] Modules linked in: ip6table_mangle ip6table_natip6table_filter ip6_tables iptable_mangle xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_umad ib_ipoib ib_cm mlx5_ib ib_uverbs ib_core fuse mlx5_core CPU: 15 UID: 0 PID: 1506 Comm: ibv_rc_pingpong Not tainted 6.12.0-rc7+ #1626 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:mlx5r_umr_post_send_wait+0x15a/0x2b0 [mlx5_ib] [..] Call Trace: <TASK> mlx5r_umr_update_xlt+0x23c/0x3e0 [mlx5_ib] mlx5_ib_invalidate_range+0x2e1/0x330 [mlx5_ib] __mmu_notifier_invalidate_range_start+0x1e1/0x240 zap_page_range_single+0xf1/0x1a0 madvise_vma_behavior+0x677/0x6e0 do_madvise+0x1a2/0x4b0 __x64_sys_madvise+0x25/0x30 do_syscall_64+0x6b/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | no fix listed | DEBIAN-CVE-2025-21732 |
| Debian:13 | linux | 6.12.15-1 | DEBIAN-CVE-2025-21732 |
| Debian:14 | linux | 6.12.15-1 | DEBIAN-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux | 6.8.0-64.67 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1032.34 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1032.34~22.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1034.39 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1015.15~24.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1034.39~22.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1022.23 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1033.35 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1015.15~24.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1033.35~22.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1028.32 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1015.17 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-26.26~24.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-64.67~22.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1029.29 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1029.29~22.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-intel-iotg | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-kvm | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-64.67.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1014.15~24.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-64.67.1~22.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1031.34 | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1010.10 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1031.34~22.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1031.34.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1022.22 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1031.31 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1029.30 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1029.30~22.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1031.35 | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-64.67~22.04.1 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-21732 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2025-21732 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2025-21732 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | e6fb246ccafbdfc86e0750af021628132fdbceac – before 63126215de7beebb662fcef7c7558c795000c904e6fb246ccafbdfc86e0750af021628132fdbceac – before b13d32786acabf70a7b04ed24b7468fc3c82977ce6fb246ccafbdfc86e0750af021628132fdbceac – before 5297f5ddffef47b94172ab0d3d62270002a3dcc1e6fb246ccafbdfc86e0750af021628132fdbceac – before abb604a1a9c87255c7a6f3b784410a9707baf467 |
| Linux | Linux | 5.13 |