CVE-2025-21892: RDMA/mlx5: Fix the recovery flow of the UMR QP
In the Linux kernel, the following vulnerability has been resolved:
RDMA/mlx5: Fix the recovery flow of the UMR QP
This patch addresses an issue in the recovery flow of the UMR QP, ensuring tasks do not get stuck, as highlighted by the call trace [1].
During recovery, before transitioning the QP to the RESET state, the software must wait for all outstanding WRs to complete.
Failing to do so can cause the firmware to skip sending some flushed CQEs with errors and simply discard them upon the RESET, as per the IB specification.
This race condition can result in lost CQEs and tasks becoming stuck.
To resolve this, the patch sends a final WR which serves only as a barrier before moving the QP state to RESET.
Once a CQE is received for that final WR, it guarantees that no outstanding WRs remain, making it safe to transition the QP to RESET and subsequently back to RTS, restoring proper functionality.
Note: For the barrier WR, we simply reuse the failed and ready WR. Since the QP is in an error state, it will only receive IBWCWRFLUSHERR. However, as it serves only as a barrier we don't care about its status.
[1] INFO: task rdmaresourcel:1922 blocked for more than 120 seconds. Tainted: G W 6.12.0-rc7+ #1626 "echo 0 > /proc/sys/kernel/hungtasktimeoutsecs" disables this message. task:rdmaresourcel state:D stack:0 pid:1922 tgid:1922 ppid:1369 flags:0x00004004 Call Trace: <TASK> schedule+0x420/0xd30 schedule+0x47/0x130 scheduletimeout+0x280/0x300 ? markheldlocks+0x48/0x80 ? lockdephardirqsonprepare+0xe5/0x1a0 waitforcompletion+0x75/0x130 mlx5rumrpostsendwait+0x3c2/0x5b0 [mlx5ib] ? pfxmlx5rumrdone+0x10/0x10 [mlx5ib] mlx5rumrrevokemr+0x93/0xc0 [mlx5ib] mlx5ibderegmr+0x299/0x520 [mlx5ib] ? rawspinunlockirq+0x24/0x40 ? waitforcompletion+0xfe/0x130 ? rdmarestrackput+0x63/0xe0 [ibcore] ibderegmruser+0x5f/0x120 [ibcore] ? lockrelease+0xc6/0x280 destroyhwidruobject+0x1d/0x60 [ibuverbs] uverbsdestroyuobject+0x58/0x1d0 [ibuverbs] uobjdestroy+0x3f/0x70 [ibuverbs] ibuverbscmdverbs+0x3e4/0xbb0 [ibuverbs] ? pfxuverbsdestroydefhandler+0x10/0x10 [ibuverbs] ? lockacquire+0x64e/0x2080 ? markheldlocks+0x48/0x80 ? findheldlock+0x2d/0xa0 ? lockacquire+0xc1/0x2f0 ? ibuverbsioctl+0xcb/0x170 [ibuverbs] ? fgetfiles+0xc3/0x1b0 ibuverbsioctl+0xe7/0x170 [ibuverbs] ? ibuverbsioctl+0xcb/0x170 [ibuverbs] x64sysioctl+0x1b0/0xa70 dosyscall64+0x6b/0x140 entrySYSCALL64afterhwframe+0x76/0x7e RIP: 0033:0x7f99c918b17b RSP: 002b:00007ffc766d0468 EFLAGS: 00000246 ORIGRAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffc766d0578 RCX: 00007f99c918b17b RDX: 00007ffc766d0560 RSI: 00000000c0181b01 RDI: 0000000000000003 RBP: 00007ffc766d0540 R08: 00007f99c8f99010 R09: 000000000000bd7e R10: 00007f99c94c1c70 R11: 0000000000000246 R12: 00007ffc766d0530 R13: 000000000000001c R14: 0000000040246a80 R15: 0000000000000000 </TASK>
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.19-1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.160 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.18 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.13.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21892?
CVE-2025-21892 is classified as medium severity, as it addresses an issue in the recovery flow of the UMR QP in the Linux kernel.
How do I fix CVE-2025-21892?
To fix CVE-2025-21892, update the Linux kernel to the latest patched version that includes the fix for the UMR QP recovery flow.
What impacts does CVE-2025-21892 have on Linux kernel performance?
CVE-2025-21892 could potentially lead to tasks getting stuck during recovery processes, impacting overall system performance.
Is my system affected by CVE-2025-21892?
If you are using a vulnerable version of the Linux kernel that utilizes the RDMA/mlx5 interface, your system may be affected by CVE-2025-21892.
What components of the Linux kernel are affected by CVE-2025-21892?
CVE-2025-21892 specifically affects the RDMA/mlx5 driver component of the Linux kernel related to UMR QP recovery operations.