# CVE-2023-53393: RDMA/mlx5: Fix mlx5\_ib\_get\_hw\_stats when used for device

> 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, CNA) `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.23% (percentile 8, 2026-11-26)
- **Published:** 2025-09-18T13:33:35.133Z
- **Modified:** 2026-06-17T06:45:11.927Z

## Who should check

- Anyone running Linux \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< 8d89870d63758363b07ace5c2df82d6bf865f78b; \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< 9a97da4674b890b4c28f5f12beba8c33a9cd2f49; \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< e597b003c736217b0c99ccf1b240c25009105238; \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< 38b50aa44495d5eb4218f0b82fc2da76505cec53
- Anyone running Linux 4.16

## Description

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

RDMA/mlx5: Fix mlx5\_ib\_get\_hw\_stats when used for device

Currently, when mlx5\_ib\_get\_hw\_stats() is used for device (port\_num = 0),
there is a special handling in order to use the correct counters, but,
port\_num is being passed down the stack without any change.  Also, some
functions assume that port\_num \>=1. As a result, the following oops can
occur.

 BUG: unable to handle page fault for address: ffff89510294f1a8
 \#PF: supervisor write access in kernel mode
 \#PF: error\_code(0x0002) - not-present page
 PGD 0 P4D 0
 Oops: 0002 \[\#1\] SMP
 CPU: 8 PID: 1382 Comm: devlink Tainted: G W          6.1.0-rc4\_for\_upstream\_base\_2022\_11\_10\_16\_12 \#1
 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
 RIP: 0010:\_raw\_spin\_lock+0xc/0x20
 Call Trace:
  \<TASK\>
  mlx5\_ib\_get\_native\_port\_mdev+0x73/0xe0 \[mlx5\_ib\]
  do\_get\_hw\_stats.constprop.0+0x109/0x160 \[mlx5\_ib\]
  mlx5\_ib\_get\_hw\_stats+0xad/0x180 \[mlx5\_ib\]
  ib\_setup\_device\_attrs+0xf0/0x290 \[ib\_core\]
  ib\_register\_device+0x3bb/0x510 \[ib\_core\]
  ? atomic\_notifier\_chain\_register+0x67/0x80
  \_\_mlx5\_ib\_add+0x2b/0x80 \[mlx5\_ib\]
  mlx5r\_probe+0xb8/0x150 \[mlx5\_ib\]
  ? auxiliary\_match\_id+0x6a/0x90
  auxiliary\_bus\_probe+0x3c/0x70
  ? driver\_sysfs\_add+0x6b/0x90
  really\_probe+0xcd/0x380
  \_\_driver\_probe\_device+0x80/0x170
  driver\_probe\_device+0x1e/0x90
  \_\_device\_attach\_driver+0x7d/0x100
  ? driver\_allows\_async\_probing+0x60/0x60
  ? driver\_allows\_async\_probing+0x60/0x60
  bus\_for\_each\_drv+0x7b/0xc0
  \_\_device\_attach+0xbc/0x200
  bus\_probe\_device+0x87/0xa0
  device\_add+0x404/0x940
  ? dev\_set\_name+0x53/0x70
  \_\_auxiliary\_device\_add+0x43/0x60
  add\_adev+0x99/0xe0 \[mlx5\_core\]
  mlx5\_attach\_device+0xc8/0x120 \[mlx5\_core\]
  mlx5\_load\_one\_devl\_locked+0xb2/0xe0 \[mlx5\_core\]
  devlink\_reload+0x133/0x250
  devlink\_nl\_cmd\_reload+0x480/0x570
  ? devlink\_nl\_pre\_doit+0x44/0x2b0
  genl\_family\_rcv\_msg\_doit.isra.0+0xc2/0x110
  genl\_rcv\_msg+0x180/0x2b0
  ? devlink\_nl\_cmd\_region\_read\_dumpit+0x540/0x540
  ? devlink\_reload+0x250/0x250
  ? devlink\_put+0x50/0x50
  ? genl\_family\_rcv\_msg\_doit.isra.0+0x110/0x110
  netlink\_rcv\_skb+0x54/0x100
  genl\_rcv+0x24/0x40
  netlink\_unicast+0x1f6/0x2c0
  netlink\_sendmsg+0x237/0x490
  sock\_sendmsg+0x33/0x40
  \_\_sys\_sendto+0x103/0x160
  ? handle\_mm\_fault+0x10e/0x290
  ? do\_user\_addr\_fault+0x1c0/0x5f0
  \_\_x64\_sys\_sendto+0x25/0x30
  do\_syscall\_64+0x3d/0x90
  entry\_SYSCALL\_64\_after\_hwframe+0x46/0xb0

Fix it by setting port\_num to 1 in order to get device status and remove
unused variable.

## Affected and fixed versions

- Linux: \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< 8d89870d63758363b07ace5c2df82d6bf865f78b; \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< 9a97da4674b890b4c28f5f12beba8c33a9cd2f49; \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< e597b003c736217b0c99ccf1b240c25009105238; \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< 38b50aa44495d5eb4218f0b82fc2da76505cec53 (cvelist)
- Linux: 4.16 (cvelist)

## Mitigation

- Upgrade Linux to 38b50aa44495d5eb4218f0b82fc2da76505cec53 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-53393.md
Affected: Linux >= aac4492ef23a176b6f1a41aadb99177eceb1fc06, < 8d89870d63758363b07ace5c2df82d6bf865f78b; >= aac4492ef23a176b6f1a41aadb99177eceb1fc06, < 9a97da4674b890b4c28f5f12beba8c33a9cd2f49; >= aac4492ef23a176b6f1a41aadb99177eceb1fc06, < e597b003c736217b0c99ccf1b240c25009105238; >= aac4492ef23a176b6f1a41a…
Fixed in: Linux 8d89870d63758363b07ace5c2df82d6bf865f78b, Linux 9a97da4674b890b4c28f5f12beba8c33a9cd2f49, Linux 38b50aa44495d5eb4218f0b82fc2da76505cec53

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-2023-53393 being exploited?

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

### How serious is CVE-2023-53393?

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

### Which versions are affected by CVE-2023-53393?

Linux \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< 8d89870d63758363b07ace5c2df82d6bf865f78b; \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< 9a97da4674b890b4c28f5f12beba8c33a9cd2f49; \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< e597b003c736217b0c99ccf1b240c25009105238; \>= aac4492ef23a176b6f1a41aadb99177eceb1fc06, \< 38b50aa44495d5eb4218f0b82fc2da76505cec53; Linux 4.16.

### Is there a fix for CVE-2023-53393?

Yes. Fixed in Linux 8d89870d63758363b07ace5c2df82d6bf865f78b, Linux 9a97da4674b890b4c28f5f12beba8c33a9cd2f49, Linux 38b50aa44495d5eb4218f0b82fc2da76505cec53. Upgrade Linux to 38b50aa44495d5eb4218f0b82fc2da76505cec53 or later.

### How do I check if I'm affected by CVE-2023-53393?

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/8d89870d63758363b07ace5c2df82d6bf865f78b>
- patch: <https://git.kernel.org/stable/c/9a97da4674b890b4c28f5f12beba8c33a9cd2f49>
- patch: <https://git.kernel.org/stable/c/e597b003c736217b0c99ccf1b240c25009105238>
- patch: <https://git.kernel.org/stable/c/38b50aa44495d5eb4218f0b82fc2da76505cec53>

## 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-2023-53393>

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