# CVE-2023-53347: net/mlx5: Handle pairing of E-switch via uplink un/load APIs

> 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-17T14:56:39.084Z
- **Modified:** 2026-06-17T06:44:57.767Z

## Who should check

- Anyone running Linux \>= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, \< b17294e7aa8c39dbb9c3e28e2d1983c88b94b387; \>= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, \< 10cbfecc0f99f579fb170feee866c9efaab7ee47; \>= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, \< 2be5bd42a5bba1a05daedc86cf0e248210009669
- Anyone running Linux 5.0

## Description

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

net/mlx5: Handle pairing of E-switch via uplink un/load APIs

In case user switch a device from switchdev mode to legacy mode, mlx5
first unpair the E-switch and afterwards unload the uplink vport.
From the other hand, in case user remove or reload a device, mlx5
first unload the uplink vport and afterwards unpair the E-switch.

The latter is causing a bug\[1\], hence, handle pairing of E-switch as
part of uplink un/load APIs.

\[1\]
In case VF\_LAG is used, every tc fdb flow is duplicated to the peer
esw. However, the original esw keeps a pointer to this duplicated
flow, not the peer esw.
e.g.: if user create tc fdb flow over esw0, the flow is duplicated
over esw1, in FW/HW, but in SW, esw0 keeps a pointer to the duplicated
flow.
During module unload while a peer tc fdb flow is still offloaded, in
case the first device to be removed is the peer device (esw1 in the
example above), the peer net-dev is destroyed, and so the mlx5e\_priv
is memset to 0.
Afterwards, the peer device is trying to unpair himself from the
original device (esw0 in the example above). Unpair API invoke the
original device to clear peer flow from its eswitch (esw0), but the
peer flow, which is stored over the original eswitch (esw0), is
trying to use the peer mlx5e\_priv, which is memset to 0 and result in
bellow kernel-oops.

\[  157.964081 \] BUG: unable to handle page fault for address: 000000000002ce60
\[  157.964662 \] \#PF: supervisor read access in kernel mode
\[  157.965123 \] \#PF: error\_code(0x0000) - not-present page
\[  157.965582 \] PGD 0 P4D 0
\[  157.965866 \] Oops: 0000 \[\#1\] SMP
\[  157.967670 \] RIP: 0010:mlx5e\_tc\_del\_fdb\_flow+0x48/0x460 \[mlx5\_core\]
\[  157.976164 \] Call Trace:
\[  157.976437 \]  \<TASK\>
\[  157.976690 \]  \_\_mlx5e\_tc\_del\_fdb\_peer\_flow+0xe6/0x100 \[mlx5\_core\]
\[  157.977230 \]  mlx5e\_tc\_clean\_fdb\_peer\_flows+0x67/0x90 \[mlx5\_core\]
\[  157.977767 \]  mlx5\_esw\_offloads\_unpair+0x2d/0x1e0 \[mlx5\_core\]
\[  157.984653 \]  mlx5\_esw\_offloads\_devcom\_event+0xbf/0x130 \[mlx5\_core\]
\[  157.985212 \]  mlx5\_devcom\_send\_event+0xa3/0xb0 \[mlx5\_core\]
\[  157.985714 \]  esw\_offloads\_disable+0x5a/0x110 \[mlx5\_core\]
\[  157.986209 \]  mlx5\_eswitch\_disable\_locked+0x152/0x170 \[mlx5\_core\]
\[  157.986757 \]  mlx5\_eswitch\_disable+0x51/0x80 \[mlx5\_core\]
\[  157.987248 \]  mlx5\_unload+0x2a/0xb0 \[mlx5\_core\]
\[  157.987678 \]  mlx5\_uninit\_one+0x5f/0xd0 \[mlx5\_core\]
\[  157.988127 \]  remove\_one+0x64/0xe0 \[mlx5\_core\]
\[  157.988549 \]  pci\_device\_remove+0x31/0xa0
\[  157.988933 \]  device\_release\_driver\_internal+0x18f/0x1f0
\[  157.989402 \]  driver\_detach+0x3f/0x80
\[  157.989754 \]  bus\_remove\_driver+0x70/0xf0
\[  157.990129 \]  pci\_unregister\_driver+0x34/0x90
\[  157.990537 \]  mlx5\_cleanup+0xc/0x1c \[mlx5\_core\]
\[  157.990972 \]  \_\_x64\_sys\_delete\_module+0x15a/0x250
\[  157.991398 \]  ? exit\_to\_user\_mode\_prepare+0xea/0x110
\[  157.991840 \]  do\_syscall\_64+0x3d/0x90
\[  157.992198 \]  entry\_SYSCALL\_64\_after\_hwframe+0x46/0xb0

## Affected and fixed versions

- Linux: \>= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, \< b17294e7aa8c39dbb9c3e28e2d1983c88b94b387; \>= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, \< 10cbfecc0f99f579fb170feee866c9efaab7ee47; \>= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, \< 2be5bd42a5bba1a05daedc86cf0e248210009669 (cvelist)
- Linux: 5.0 (cvelist)

## Mitigation

- Upgrade Linux to 2be5bd42a5bba1a05daedc86cf0e248210009669 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-53347. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-53347.md
Affected: Linux >= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, < b17294e7aa8c39dbb9c3e28e2d1983c88b94b387; >= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, < 10cbfecc0f99f579fb170feee866c9efaab7ee47; >= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, < 2be5bd42a5bba1a05daedc86cf0e248210009669; Linux 5.0
Fixed in: Linux 10cbfecc0f99f579fb170feee866c9efaab7ee47, Linux 2be5bd42a5bba1a05daedc86cf0e248210009669

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

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

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

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

Linux \>= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, \< b17294e7aa8c39dbb9c3e28e2d1983c88b94b387; \>= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, \< 10cbfecc0f99f579fb170feee866c9efaab7ee47; \>= 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d, \< 2be5bd42a5bba1a05daedc86cf0e248210009669; Linux 5.0.

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

Yes. Fixed in Linux 10cbfecc0f99f579fb170feee866c9efaab7ee47, Linux 2be5bd42a5bba1a05daedc86cf0e248210009669. Upgrade Linux to 2be5bd42a5bba1a05daedc86cf0e248210009669 or later.

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

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/b17294e7aa8c39dbb9c3e28e2d1983c88b94b387>
- patch: <https://git.kernel.org/stable/c/10cbfecc0f99f579fb170feee866c9efaab7ee47>
- patch: <https://git.kernel.org/stable/c/2be5bd42a5bba1a05daedc86cf0e248210009669>

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

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