# CVE-2024-38557: net/mlx5: Reload only IB representors upon lag disable/enable

> 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.23% (percentile 9, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2024-06-19T13:35:27.426Z
- **Modified:** 2026-10-30T13:17:28.493Z

## Who should check

- Anyone running Linux \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< 6077962743c037cbd49fd31e5c4cdd20ffd03bad; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< e93fc8d959e56092e2eca1e5511c2d2f0ad6807a; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< f03c714a0fdd1f93101a929d0e727c28a66383fc; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< 0f320f28f54b1b269a755be2e3fb3695e0b80b07; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< 0f06228d4a2dcc1fca5b3ddb0eefa09c05b102c4
- Anyone running Linux 5.15

## Description

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

net/mlx5: Reload only IB representors upon lag disable/enable

On lag disable, the bond IB device along with all of its
representors are destroyed, and then the slaves' representors get reloaded.

In case the slave IB representor load fails, the eswitch error flow
unloads all representors, including ethernet representors, where the
netdevs get detached and removed from lag bond. Such flow is inaccurate
as the lag driver is not responsible for loading/unloading ethernet
representors. Furthermore, the flow described above begins by holding
lag lock to prevent bond changes during disable flow. However, when
reaching the ethernet representors detachment from lag, the lag lock is
required again, triggering the following deadlock:

Call trace:
\_\_switch\_to+0xf4/0x148
\_\_schedule+0x2c8/0x7d0
schedule+0x50/0xe0
schedule\_preempt\_disabled+0x18/0x28
\_\_mutex\_lock.isra.13+0x2b8/0x570
\_\_mutex\_lock\_slowpath+0x1c/0x28
mutex\_lock+0x4c/0x68
mlx5\_lag\_remove\_netdev+0x3c/0x1a0 \[mlx5\_core\]
mlx5e\_uplink\_rep\_disable+0x70/0xa0 \[mlx5\_core\]
mlx5e\_detach\_netdev+0x6c/0xb0 \[mlx5\_core\]
mlx5e\_netdev\_change\_profile+0x44/0x138 \[mlx5\_core\]
mlx5e\_netdev\_attach\_nic\_profile+0x28/0x38 \[mlx5\_core\]
mlx5e\_vport\_rep\_unload+0x184/0x1b8 \[mlx5\_core\]
mlx5\_esw\_offloads\_rep\_load+0xd8/0xe0 \[mlx5\_core\]
mlx5\_eswitch\_reload\_reps+0x74/0xd0 \[mlx5\_core\]
mlx5\_disable\_lag+0x130/0x138 \[mlx5\_core\]
mlx5\_lag\_disable\_change+0x6c/0x70 \[mlx5\_core\] // hold ldev-\>lock
mlx5\_devlink\_eswitch\_mode\_set+0xc0/0x410 \[mlx5\_core\]
devlink\_nl\_cmd\_eswitch\_set\_doit+0xdc/0x180
genl\_family\_rcv\_msg\_doit.isra.17+0xe8/0x138
genl\_rcv\_msg+0xe4/0x220
netlink\_rcv\_skb+0x44/0x108
genl\_rcv+0x40/0x58
netlink\_unicast+0x198/0x268
netlink\_sendmsg+0x1d4/0x418
sock\_sendmsg+0x54/0x60
\_\_sys\_sendto+0xf4/0x120
\_\_arm64\_sys\_sendto+0x30/0x40
el0\_svc\_common+0x8c/0x120
do\_el0\_svc+0x30/0xa0
el0\_svc+0x20/0x30
el0\_sync\_handler+0x90/0xb8
el0\_sync+0x160/0x180

Thus, upon lag enable/disable, load and unload only the IB representors
of the slaves preventing the deadlock mentioned above.

While at it, refactor the mlx5\_esw\_offloads\_rep\_load() function to have
a static helper method for its internal logic, in symmetry with the
representor unload design.

## Affected and fixed versions

- Linux: \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< 6077962743c037cbd49fd31e5c4cdd20ffd03bad; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< e93fc8d959e56092e2eca1e5511c2d2f0ad6807a; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< f03c714a0fdd1f93101a929d0e727c28a66383fc; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< 0f320f28f54b1b269a755be2e3fb3695e0b80b07; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< 0f06228d4a2dcc1fca5b3ddb0eefa09c05b102c4 (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

- Upgrade Linux to 0f06228d4a2dcc1fca5b3ddb0eefa09c05b102c4 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-38557.md
Affected: Linux >= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, < 6077962743c037cbd49fd31e5c4cdd20ffd03bad; >= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, < e93fc8d959e56092e2eca1e5511c2d2f0ad6807a; >= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, < f03c714a0fdd1f93101a929d0e727c28a66383fc; >= 598fe77df855feeeca9dfda…
Fixed in: Linux 6077962743c037cbd49fd31e5c4cdd20ffd03bad, Linux 0f320f28f54b1b269a755be2e3fb3695e0b80b07, Linux 0f06228d4a2dcc1fca5b3ddb0eefa09c05b102c4

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-2024-38557 being exploited?

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

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

### Which versions are affected by CVE-2024-38557?

Linux \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< 6077962743c037cbd49fd31e5c4cdd20ffd03bad; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< e93fc8d959e56092e2eca1e5511c2d2f0ad6807a; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< f03c714a0fdd1f93101a929d0e727c28a66383fc; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< 0f320f28f54b1b269a755be2e3fb3695e0b80b07; \>= 598fe77df855feeeca9dfda2ffe622ac7724e5c3, \< 0f06228d4a2dcc1fca5b3ddb0eefa09c05b102c4; Linux 5.15.

### Is there a fix for CVE-2024-38557?

Yes. Fixed in Linux 6077962743c037cbd49fd31e5c4cdd20ffd03bad, Linux 0f320f28f54b1b269a755be2e3fb3695e0b80b07, Linux 0f06228d4a2dcc1fca5b3ddb0eefa09c05b102c4. Upgrade Linux to 0f06228d4a2dcc1fca5b3ddb0eefa09c05b102c4 or later.

### How do I check if I'm affected by CVE-2024-38557?

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/e93fc8d959e56092e2eca1e5511c2d2f0ad6807a>
- patch: <https://git.kernel.org/stable/c/f03c714a0fdd1f93101a929d0e727c28a66383fc>
- patch: <https://git.kernel.org/stable/c/0f320f28f54b1b269a755be2e3fb3695e0b80b07>
- patch: <https://git.kernel.org/stable/c/0f06228d4a2dcc1fca5b3ddb0eefa09c05b102c4>
- other: <https://git.kernel.org/stable/c/6077962743c037cbd49fd31e5c4cdd20ffd03bad>

## 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-2024-38557>

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