# CVE-2025-21888: RDMA/mlx5: Fix a WARN during dereg\_mr for DM type

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.28% (percentile 13, 2026-11-26)
- **Published:** 2025-03-27T14:57:15.141Z
- **Modified:** 2026-10-30T13:17:53.680Z

## Who should check

- Anyone running Linux \>= f18ec422311767738ef4033b61e91cae07163b22, \< 8fe3c674ef289cdc0760fe787e7584d805ab9301; \>= f18ec422311767738ef4033b61e91cae07163b22, \< 6e59f56161cccc437d665212d5c3ea3f1c3f5a1f; \>= f18ec422311767738ef4033b61e91cae07163b22, \< 0bd34bdd468e93a779c403de3cf7d43ee633b3e0; \>= f18ec422311767738ef4033b61e91cae07163b22, \< f1298cad47ae29828c5c5be77e733ccfcaef6a7f; \>= f18ec422311767738ef4033b61e91cae07163b22, \< abc7b3f1f056d69a8f11d6dceecc0c9549ace770
- Anyone running Linux 5.13

## Description

In the Linux kernel, the following vulnerability has been resolved:

RDMA/mlx5: Fix a WARN during dereg\_mr for DM type

Memory regions (MR) of type DM (device memory) do not have an associated
umem.

In the \_\_mlx5\_ib\_dereg\_mr() -\> mlx5\_free\_priv\_descs() flow, the code
incorrectly takes the wrong branch, attempting to call
dma\_unmap\_single() on a DMA address that is not mapped.

This results in a WARN \[1\], as shown below.

The issue is resolved by properly accounting for the DM type and
ensuring the correct branch is selected in mlx5\_free\_priv\_descs().

\[1\]
WARNING: CPU: 12 PID: 1346 at drivers/iommu/dma-iommu.c:1230 iommu\_dma\_unmap\_page+0x79/0x90
Modules linked in: ip6table\_mangle ip6table\_nat ip6table\_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 ovelay rpcrdma rdma\_ucm ib\_iser libiscsi scsi\_transport\_iscsi ib\_umad rdma\_cm ib\_ipoib iw\_cm ib\_cm mlx5\_ib ib\_uverbs ib\_core fuse mlx5\_core
CPU: 12 UID: 0 PID: 1346 Comm: ibv\_rc\_pingpong Not tainted 6.12.0-rc7+ \#1631
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
RIP: 0010:iommu\_dma\_unmap\_page+0x79/0x90
Code: 2b 49 3b 29 72 26 49 3b 69 08 73 20 4d 89 f0 44 89 e9 4c 89 e2 48 89 ee 48 89 df 5b 5d 41 5c 41 5d 41 5e 41 5f e9 07 b8 88 ff \<0f\> 0b 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 66 0f 1f 44 00
RSP: 0018:ffffc90001913a10 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88810194b0a8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: ffff88810194b0a8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
FS:  00007f537abdd740(0000) GS:ffff88885fb00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f537aeb8000 CR3: 000000010c248001 CR4: 0000000000372eb0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
\<TASK\>
? \_\_warn+0x84/0x190
? iommu\_dma\_unmap\_page+0x79/0x90
? report\_bug+0xf8/0x1c0
? handle\_bug+0x55/0x90
? exc\_invalid\_op+0x13/0x60
? asm\_exc\_invalid\_op+0x16/0x20
? iommu\_dma\_unmap\_page+0x79/0x90
dma\_unmap\_page\_attrs+0xe6/0x290
mlx5\_free\_priv\_descs+0xb0/0xe0 \[mlx5\_ib\]
\_\_mlx5\_ib\_dereg\_mr+0x37e/0x520 \[mlx5\_ib\]
? \_raw\_spin\_unlock\_irq+0x24/0x40
? wait\_for\_completion+0xfe/0x130
? rdma\_restrack\_put+0x63/0xe0 \[ib\_core\]
ib\_dereg\_mr\_user+0x5f/0x120 \[ib\_core\]
? lock\_release+0xc6/0x280
destroy\_hw\_idr\_uobject+0x1d/0x60 \[ib\_uverbs\]
uverbs\_destroy\_uobject+0x58/0x1d0 \[ib\_uverbs\]
uobj\_destroy+0x3f/0x70 \[ib\_uverbs\]
ib\_uverbs\_cmd\_verbs+0x3e4/0xbb0 \[ib\_uverbs\]
? \_\_pfx\_uverbs\_destroy\_def\_handler+0x10/0x10 \[ib\_uverbs\]
? lock\_acquire+0xc1/0x2f0
? ib\_uverbs\_ioctl+0xcb/0x170 \[ib\_uverbs\]
? ib\_uverbs\_ioctl+0x116/0x170 \[ib\_uverbs\]
? lock\_release+0xc6/0x280
ib\_uverbs\_ioctl+0xe7/0x170 \[ib\_uverbs\]
? ib\_uverbs\_ioctl+0xcb/0x170 \[ib\_uverbs\]
\_\_x64\_sys\_ioctl+0x1b0/0xa70
do\_syscall\_64+0x6b/0x140
entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
RIP: 0033:0x7f537adaf17b
Code: 0f 1e fa 48 8b 05 1d ad 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 \<48\> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ed ac 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007ffff218f0b8 EFLAGS: 00000246 ORIG\_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffff218f1d8 RCX: 00007f537adaf17b
RDX: 00007ffff218f1c0 RSI: 00000000c0181b01 RDI: 0000000000000003
RBP: 00007ffff218f1a0 R08: 00007f537aa8d010 R09: 0000561ee2e4f270
R10: 00007f537aace3a8 R11: 0000000000000246 R12: 00007ffff218f190
R13: 000000000000001c R14: 0000561ee2e4d7c0 R15: 00007ffff218f450
\</TASK\>

## Affected and fixed versions

- Linux: \>= f18ec422311767738ef4033b61e91cae07163b22, \< 8fe3c674ef289cdc0760fe787e7584d805ab9301; \>= f18ec422311767738ef4033b61e91cae07163b22, \< 6e59f56161cccc437d665212d5c3ea3f1c3f5a1f; \>= f18ec422311767738ef4033b61e91cae07163b22, \< 0bd34bdd468e93a779c403de3cf7d43ee633b3e0; \>= f18ec422311767738ef4033b61e91cae07163b22, \< f1298cad47ae29828c5c5be77e733ccfcaef6a7f; \>= f18ec422311767738ef4033b61e91cae07163b22, \< abc7b3f1f056d69a8f11d6dceecc0c9549ace770 (cvelist)
- Linux: 5.13 (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-21888. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21888.md
Affected: Linux >= f18ec422311767738ef4033b61e91cae07163b22, < 8fe3c674ef289cdc0760fe787e7584d805ab9301; >= f18ec422311767738ef4033b61e91cae07163b22, < 6e59f56161cccc437d665212d5c3ea3f1c3f5a1f; >= f18ec422311767738ef4033b61e91cae07163b22, < 0bd34bdd468e93a779c403de3cf7d43ee633b3e0; >= f18ec422311767738ef4033…
Fixed in: Linux 8fe3c674ef289cdc0760fe787e7584d805ab9301, Linux 6e59f56161cccc437d665212d5c3ea3f1c3f5a1f, Linux 0bd34bdd468e93a779c403de3cf7d43ee633b3e0

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-21888 being exploited?

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= f18ec422311767738ef4033b61e91cae07163b22, \< 8fe3c674ef289cdc0760fe787e7584d805ab9301; \>= f18ec422311767738ef4033b61e91cae07163b22, \< 6e59f56161cccc437d665212d5c3ea3f1c3f5a1f; \>= f18ec422311767738ef4033b61e91cae07163b22, \< 0bd34bdd468e93a779c403de3cf7d43ee633b3e0; \>= f18ec422311767738ef4033b61e91cae07163b22, \< f1298cad47ae29828c5c5be77e733ccfcaef6a7f; \>= f18ec422311767738ef4033b61e91cae07163b22, \< abc7b3f1f056d69a8f11d6dceecc0c9549ace770; Linux 5.13.

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

Yes. Fixed in Linux 8fe3c674ef289cdc0760fe787e7584d805ab9301, Linux 6e59f56161cccc437d665212d5c3ea3f1c3f5a1f, Linux 0bd34bdd468e93a779c403de3cf7d43ee633b3e0. No fix listed yet: follow the vendor advisory.

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

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/0bd34bdd468e93a779c403de3cf7d43ee633b3e0>
- patch: <https://git.kernel.org/stable/c/f1298cad47ae29828c5c5be77e733ccfcaef6a7f>
- patch: <https://git.kernel.org/stable/c/abc7b3f1f056d69a8f11d6dceecc0c9549ace770>
- other: <https://git.kernel.org/stable/c/8fe3c674ef289cdc0760fe787e7584d805ab9301>
- other: <https://git.kernel.org/stable/c/6e59f56161cccc437d665212d5c3ea3f1c3f5a1f>

## 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-21888>

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