# CVE-2025-21714: RDMA/mlx5: Fix implicit ODP use after free

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-02-27T02:07:25.570Z
- **Modified:** 2026-10-30T13:17:51.727Z

## Who should check

- Anyone running Linux \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< 032f3f799fdb807a21467b7dc7d620395a735e2b; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< a306dfff6b76aafa264ad33874a8992a8d5858b7; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< 7cc8f681f6d4ae4478ae0f60485fc768f2b450da; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< edfb65dbb9ffd3102f3ff4dd21316158e56f1976; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< d3d930411ce390e532470194296658a960887773
- Anyone running Linux 5.5

## Description

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\>

## Affected and fixed versions

- Linux: \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< 032f3f799fdb807a21467b7dc7d620395a735e2b; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< a306dfff6b76aafa264ad33874a8992a8d5858b7; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< 7cc8f681f6d4ae4478ae0f60485fc768f2b450da; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< edfb65dbb9ffd3102f3ff4dd21316158e56f1976; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< d3d930411ce390e532470194296658a960887773 (cvelist)
- Linux: 5.5 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21714. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21714.md
Affected: Linux >= 5256edcb98a14b11409a2d323f56a70a8b366363, < 032f3f799fdb807a21467b7dc7d620395a735e2b; >= 5256edcb98a14b11409a2d323f56a70a8b366363, < a306dfff6b76aafa264ad33874a8992a8d5858b7; >= 5256edcb98a14b11409a2d323f56a70a8b366363, < 7cc8f681f6d4ae4478ae0f60485fc768f2b450da; >= 5256edcb98a14b11409a2d3…
Fixed in: Linux 032f3f799fdb807a21467b7dc7d620395a735e2b, Linux 7cc8f681f6d4ae4478ae0f60485fc768f2b450da

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21714 being exploited?

There is no confirmed exploitation: CVE-2025-21714 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21714?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-21714?

Linux \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< 032f3f799fdb807a21467b7dc7d620395a735e2b; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< a306dfff6b76aafa264ad33874a8992a8d5858b7; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< 7cc8f681f6d4ae4478ae0f60485fc768f2b450da; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< edfb65dbb9ffd3102f3ff4dd21316158e56f1976; \>= 5256edcb98a14b11409a2d323f56a70a8b366363, \< d3d930411ce390e532470194296658a960887773; Linux 5.5.

### Is there a fix for CVE-2025-21714?

Yes. Fixed in Linux 032f3f799fdb807a21467b7dc7d620395a735e2b, Linux 7cc8f681f6d4ae4478ae0f60485fc768f2b450da. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-21714?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/7cc8f681f6d4ae4478ae0f60485fc768f2b450da>
- patch: <https://git.kernel.org/stable/c/edfb65dbb9ffd3102f3ff4dd21316158e56f1976>
- patch: <https://git.kernel.org/stable/c/d3d930411ce390e532470194296658a960887773>
- other: <https://git.kernel.org/stable/c/032f3f799fdb807a21467b7dc7d620395a735e2b>
- other: <https://git.kernel.org/stable/c/a306dfff6b76aafa264ad33874a8992a8d5858b7>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21714>

HTML: <https://flawdb.com/CVE-2025-21714> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21714>
