# CVE-2025-22091: RDMA/mlx5: Fix page\_size variable overflow

> 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 14, 2026-11-26)
- **CWE:** CWE-190
- **Published:** 2025-04-16T14:12:43.228Z
- **Modified:** 2026-11-05T21:17:48.643Z

## Who should check

- Anyone running Linux \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< 01fd737776ca0f17a96d83cd7f0840ce130b9a02; \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< e0c09f639ca0e102f250df8787740c2013e9d1b3; \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< 05b215d5e219c0228b9c7082ba9bcf176c576646; \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< f0c2427412b43cdf1b7b0944749ea17ddb97d5a5
- Anyone running Linux 6.12

## Description

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

RDMA/mlx5: Fix page\_size variable overflow

Change all variables storing mlx5\_umem\_mkc\_find\_best\_pgsz() result to
unsigned long to support values larger than 31 and avoid overflow.

For example: If we try to register 4GB of memory that is contiguous in
physical memory, the driver will optimize the page\_size and try to use
an mkey with 4GB entity size. The 'unsigned int' page\_size variable will
overflow to '0' and we'll hit the WARN\_ON() in alloc\_cacheable\_mr().

WARNING: CPU: 2 PID: 1203 at drivers/infiniband/hw/mlx5/mr.c:1124 alloc\_cacheable\_mr+0x22/0x580 \[mlx5\_ib\]
Modules linked in: mlx5\_ib mlx5\_core bonding ip6\_gre ip6\_tunnel tunnel6 ip\_gre gre rdma\_rxe rdma\_ucm ib\_uverbs ib\_ipoib ib\_umad rpcrdma ib\_iser libiscsi scsi\_transport\_iscsi rdma\_cm iw\_cm ib\_cm fuse ib\_core \[last unloaded: mlx5\_core\]
CPU: 2 UID: 70878 PID: 1203 Comm: rdma\_resource\_l Tainted: G        W          6.14.0-rc4-dirty \#43
Tainted: \[W\]=WARN
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
RIP: 0010:alloc\_cacheable\_mr+0x22/0x580 \[mlx5\_ib\]
Code: 90 90 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 41 52 53 48 83 ec 30 f6 46 28 04 4c 8b 77 08 75 21 \<0f\> 0b 49 c7 c2 ea ff ff ff 48 8d 65 d0 4c 89 d0 5b 41 5a 41 5c 41
RSP: 0018:ffffc900006ffac8 EFLAGS: 00010246
RAX: 0000000004c0d0d0 RBX: ffff888217a22000 RCX: 0000000000100001
RDX: 00007fb7ac480000 RSI: ffff8882037b1240 RDI: ffff8882046f0600
RBP: ffffc900006ffb28 R08: 0000000000000001 R09: 0000000000000000
R10: 00000000000007e0 R11: ffffea0008011d40 R12: ffff8882037b1240
R13: ffff8882046f0600 R14: ffff888217a22000 R15: ffffc900006ffe00
FS:  00007fb7ed013340(0000) GS:ffff88885fd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb7ed1d8000 CR3: 00000001fd8f6006 CR4: 0000000000772eb0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
 \<TASK\>
 ? \_\_warn+0x81/0x130
 ? alloc\_cacheable\_mr+0x22/0x580 \[mlx5\_ib\]
 ? report\_bug+0xfc/0x1e0
 ? handle\_bug+0x55/0x90
 ? exc\_invalid\_op+0x17/0x70
 ? asm\_exc\_invalid\_op+0x1a/0x20
 ? alloc\_cacheable\_mr+0x22/0x580 \[mlx5\_ib\]
 create\_real\_mr+0x54/0x150 \[mlx5\_ib\]
 ib\_uverbs\_reg\_mr+0x17f/0x2a0 \[ib\_uverbs\]
 ib\_uverbs\_handler\_UVERBS\_METHOD\_INVOKE\_WRITE+0xca/0x140 \[ib\_uverbs\]
 ib\_uverbs\_run\_method+0x6d0/0x780 \[ib\_uverbs\]
 ? \_\_pfx\_ib\_uverbs\_handler\_UVERBS\_METHOD\_INVOKE\_WRITE+0x10/0x10 \[ib\_uverbs\]
 ib\_uverbs\_cmd\_verbs+0x19b/0x360 \[ib\_uverbs\]
 ? walk\_system\_ram\_range+0x79/0xd0
 ? \_\_\_pte\_offset\_map+0x1b/0x110
 ? \_\_pte\_offset\_map\_lock+0x80/0x100
 ib\_uverbs\_ioctl+0xac/0x110 \[ib\_uverbs\]
 \_\_x64\_sys\_ioctl+0x94/0xb0
 do\_syscall\_64+0x50/0x110
 entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
RIP: 0033:0x7fb7ecf0737b
Code: ff ff ff 85 c0 79 9b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 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 7d 2a 0f 00 f7 d8 64 89 01 48
RSP: 002b:00007ffdbe03ecc8 EFLAGS: 00000246 ORIG\_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffdbe03edb8 RCX: 00007fb7ecf0737b
RDX: 00007ffdbe03eda0 RSI: 00000000c0181b01 RDI: 0000000000000003
RBP: 00007ffdbe03ed80 R08: 00007fb7ecc84010 R09: 00007ffdbe03eed4
R10: 0000000000000009 R11: 0000000000000246 R12: 00007ffdbe03eed4
R13: 000000000000000c R14: 000000000000000c R15: 00007fb7ecc84150
 \</TASK\>

## Affected and fixed versions

- Linux: \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< 01fd737776ca0f17a96d83cd7f0840ce130b9a02; \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< e0c09f639ca0e102f250df8787740c2013e9d1b3; \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< 05b215d5e219c0228b9c7082ba9bcf176c576646; \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< f0c2427412b43cdf1b7b0944749ea17ddb97d5a5 (cvelist)
- Linux: 6.12 (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-22091. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-22091.md
Affected: Linux >= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, < 01fd737776ca0f17a96d83cd7f0840ce130b9a02; >= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, < e0c09f639ca0e102f250df8787740c2013e9d1b3; >= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, < 05b215d5e219c0228b9c7082ba9bcf176c576646; >= cef7dde8836ab09a3bfe96a…
Fixed in: Linux 01fd737776ca0f17a96d83cd7f0840ce130b9a02, Linux 05b215d5e219c0228b9c7082ba9bcf176c576646

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

There is no confirmed exploitation: CVE-2025-22091 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-22091?

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

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

Linux \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< 01fd737776ca0f17a96d83cd7f0840ce130b9a02; \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< e0c09f639ca0e102f250df8787740c2013e9d1b3; \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< 05b215d5e219c0228b9c7082ba9bcf176c576646; \>= cef7dde8836ab09a3bfe96ada4f18ef2496eacc9, \< f0c2427412b43cdf1b7b0944749ea17ddb97d5a5; Linux 6.12.

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

Yes. Fixed in Linux 01fd737776ca0f17a96d83cd7f0840ce130b9a02, Linux 05b215d5e219c0228b9c7082ba9bcf176c576646. No fix listed yet: follow the vendor advisory.

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

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/01fd737776ca0f17a96d83cd7f0840ce130b9a02>
- patch: <https://git.kernel.org/stable/c/e0c09f639ca0e102f250df8787740c2013e9d1b3>
- patch: <https://git.kernel.org/stable/c/05b215d5e219c0228b9c7082ba9bcf176c576646>
- patch: <https://git.kernel.org/stable/c/f0c2427412b43cdf1b7b0944749ea17ddb97d5a5>

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

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