CVE-2025-21714·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: RDMA/mlx5: Fix implicit ODP use after free Prevent double queueing of implicit ODP mr destroy work by using __xa_cmpxchg() to make sure this is the only time we are destroying this specific mr. Without this change, we could try to invalidate this mr twice, which in turn could result in queuing a MR work destroy twice, and eventually the second work could execute after the MR was freed due to the first work, causing a user after free and trace below. refcount_t: underflow; use-after-free. WARNING: CPU: 2 PID: 12178 at lib/refcount.c:28 refcount_warn_saturate+0x12b/0x130 Modules linked in: bonding ib_ipoib vfio_pci ip_gre geneve nf_tables ip6_gre gre ip6_tunnel tunnel6 ipip tunnel4 ib_umad rdma_ucm mlx5_vfio_pci vfio_pci_core vfio_iommu_type1 mlx5_ib vfio ib_uverbs mlx5_core iptable_raw openvswitch nsh rpcrdma ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_cm ib_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay zram zsmalloc fuse [last unloaded: ib_uverbs] CPU: 2 PID: 12178 Comm: kworker/u20:5 Not tainted 6.5.0-rc1_net_next_mlx5_58c644e #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: events_unbound free_implicit_child_mr_work [mlx5_ib] RIP: 0010:refcount_warn_saturate+0x12b/0x130 Code: 48 c7 c7 38 95 2a 82 c6 05 bc c6 fe 00 01 e8 0c 66 aa ff 0f 0b 5b c3 48 c7 c7 e0 94 2a 82 c6 05 a7 c6 fe 00 01 e8 f5 65 aa ff <0f> 0b 5b c3 90 8b 07 3d 00 00 00 c0 74 12 83 f8 01 74 13 8d 50 ff RSP: 0018:ffff8881008e3e40 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027 RDX: ffff88852c91b5c8 RSI: 0000000000000001 RDI: ffff88852c91b5c0 RBP: ffff8881dacd4e00 R08: 00000000ffffffff R09: 0000000000000019 R10: 000000000000072e R11: 0000000063666572 R12: ffff88812bfd9e00 R13: ffff8881c792d200 R14: ffff88810011c005 R15: ffff8881002099c0 FS: 0000000000000000(0000) GS:ffff88852c900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5694b5e000 CR3: 00000001153f6003 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? refcount_warn_saturate+0x12b/0x130 free_implicit_child_mr_work+0x180/0x1b0 [mlx5_ib] process_one_work+0x1cc/0x3c0 worker_thread+0x218/0x3c0 kthread+0xc6/0xf0 ret_from_fork+0x1f/0x30 </TASK>
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.13.2
- Published
- 2025-02-27
Affected versions
From: 6.13
Until: 6.13.2
Fixed in: 6.13.2
How to fix this CVE
Update your Linux kernel to version 6.13.2 or later to patch the RDMA/mlx5 implicit ODP use-after-free vulnerability. This fix prevents double queueing of memory region destroy work that could lead to kernel memory corruption. Reboot the system after applying the kernel update to ensure the patched version is loaded.
sudo dnf upgrade kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Run 'uname -r' to check the currently running kernel version; vulnerable systems run 6.13.0, 6.13.1, or 6.13.2 (pre-patch)
- Check if mlx5_ib (Mellanox RDMA) driver is loaded with 'lsmod | grep mlx5_ib' — this vulnerability only affects systems using Mellanox RDMA hardware
- Search kernel logs for 'refcount_t: underflow; use-after-free' or 'free_implicit_child_mr_work' using 'sudo journalctl -u kernel --no-pager | grep -i "use-after-free\|refcount"'
- Verify the patch is applied by confirming kernel version is 6.13.2 or later with 'uname -r' after reboot
FAQ
What is CVE-2025-21714?
This is a use-after-free vulnerability in the Linux kernel's RDMA/mlx5 driver affecting implicit On-Demand Paging (ODP) memory regions. A race condition allows a memory region to be queued for destruction twice, causing the second cleanup operation to access freed memory and corrupt kernel state.
Is CVE-2025-21714 being actively exploited?
No, there is no evidence of active exploitation in the wild or public exploit code available. This is primarily a local denial-of-service and kernel stability risk.
What versions of Kernel are affected by CVE-2025-21714?
Linux kernel versions 6.13.0, 6.13.1, and 6.13.2 (before the patch) are affected. The fix was released in kernel 6.13.2.
How do I check if my server is vulnerable to CVE-2025-21714?
Run 'uname -r' to check your kernel version. If it shows 6.13.0, 6.13.1, or early 6.13.2 and 'lsmod | grep mlx5_ib' shows the Mellanox RDMA driver is loaded, your system is vulnerable.
Does Defensia detect CVE-2025-21714?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2025-21714 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-21714. Free for 1 server.
Get started free