# CVE-2024-38595: net/mlx5: Fix peer devlink set for SF representor devlink port

> 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.30% (percentile 16, 2026-11-26)
- **Published:** 2024-06-19T13:45:45.336Z
- **Modified:** 2026-06-17T07:40:40.287Z

## Who should check

- Anyone running Linux \>= 967caa3d37c078e5b95a32094657e6a4cad145f0, \< a0501201751034ebe7a22bd9483ed28fea1cd213; \>= c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8, \< 05d9d7b66836d87c914f8fdd4b062b78e373458d; \>= c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8, \< 3c453e8cc672de1f9c662948dba43176bc68d7f0; 8c91c60858473731bcdaf04fda99fcbcf84420d4; 8256c1211dc6fa606269aa043b6e294247820b31; \>= 6.8.7, \< 6.8.12; \>= 6.6.28, \< 6.7
- Anyone running Linux 6.9

## Description

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

net/mlx5: Fix peer devlink set for SF representor devlink port

The cited patch change register devlink flow, and neglect to reflect
the changes for peer devlink set logic. Peer devlink set is
triggering a call trace if done after devl\_register.\[1\]

Hence, align peer devlink set logic with register devlink flow.

\[1\]
WARNING: CPU: 4 PID: 3394 at net/devlink/core.c:155 devlink\_rel\_nested\_in\_add+0x177/0x180
CPU: 4 PID: 3394 Comm: kworker/u40:1 Not tainted 6.9.0-rc4\_for\_linust\_min\_debug\_2024\_04\_16\_14\_08 \#1
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
Workqueue: mlx5\_vhca\_event0 mlx5\_vhca\_state\_work\_handler \[mlx5\_core\]
RIP: 0010:devlink\_rel\_nested\_in\_add+0x177/0x180
Call Trace:
 \<TASK\>
 ? \_\_warn+0x78/0x120
 ? devlink\_rel\_nested\_in\_add+0x177/0x180
 ? report\_bug+0x16d/0x180
 ? handle\_bug+0x3c/0x60
 ? exc\_invalid\_op+0x14/0x70
 ? asm\_exc\_invalid\_op+0x16/0x20
 ? devlink\_port\_init+0x30/0x30
 ? devlink\_port\_type\_clear+0x50/0x50
 ? devlink\_rel\_nested\_in\_add+0x177/0x180
 ? devlink\_rel\_nested\_in\_add+0xdd/0x180
 mlx5\_sf\_mdev\_event+0x74/0xb0 \[mlx5\_core\]
 notifier\_call\_chain+0x35/0xb0
 blocking\_notifier\_call\_chain+0x3d/0x60
 mlx5\_blocking\_notifier\_call\_chain+0x22/0x30 \[mlx5\_core\]
 mlx5\_sf\_dev\_probe+0x185/0x3e0 \[mlx5\_core\]
 auxiliary\_bus\_probe+0x38/0x80
 ? driver\_sysfs\_add+0x51/0x80
 really\_probe+0xc5/0x3a0
 ? driver\_probe\_device+0x90/0x90
 \_\_driver\_probe\_device+0x80/0x160
 driver\_probe\_device+0x1e/0x90
 \_\_device\_attach\_driver+0x7d/0x100
 bus\_for\_each\_drv+0x80/0xd0
 \_\_device\_attach+0xbc/0x1f0
 bus\_probe\_device+0x86/0xa0
 device\_add+0x64f/0x860
 \_\_auxiliary\_device\_add+0x3b/0xa0
 mlx5\_sf\_dev\_add+0x139/0x330 \[mlx5\_core\]
 mlx5\_sf\_dev\_state\_change\_handler+0x1e4/0x250 \[mlx5\_core\]
 notifier\_call\_chain+0x35/0xb0
 blocking\_notifier\_call\_chain+0x3d/0x60
 mlx5\_vhca\_state\_work\_handler+0x151/0x200 \[mlx5\_core\]
 process\_one\_work+0x13f/0x2e0
 worker\_thread+0x2bd/0x3c0
 ? rescuer\_thread+0x410/0x410
 kthread+0xc4/0xf0
 ? kthread\_complete\_and\_exit+0x20/0x20
 ret\_from\_fork+0x2d/0x50
 ? kthread\_complete\_and\_exit+0x20/0x20
 ret\_from\_fork\_asm+0x11/0x20
 \</TASK\>

## Affected and fixed versions

- Linux: \>= 967caa3d37c078e5b95a32094657e6a4cad145f0, \< a0501201751034ebe7a22bd9483ed28fea1cd213; \>= c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8, \< 05d9d7b66836d87c914f8fdd4b062b78e373458d; \>= c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8, \< 3c453e8cc672de1f9c662948dba43176bc68d7f0; 8c91c60858473731bcdaf04fda99fcbcf84420d4; 8256c1211dc6fa606269aa043b6e294247820b31; \>= 6.8.7, \< 6.8.12; \>= 6.6.28, \< 6.7 (cvelist)
- Linux: 6.9 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2024-38595.md
Affected: Linux >= 967caa3d37c078e5b95a32094657e6a4cad145f0, < a0501201751034ebe7a22bd9483ed28fea1cd213; >= c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8, < 05d9d7b66836d87c914f8fdd4b062b78e373458d; >= c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8, < 3c453e8cc672de1f9c662948dba43176bc68d7f0; 8c91c60858473731bcdaf04fda…
Fixed in: Linux 05d9d7b66836d87c914f8fdd4b062b78e373458d, Linux 3c453e8cc672de1f9c662948dba43176bc68d7f0, Linux 6.8.12, Linux 6.7

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

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

### How serious is CVE-2024-38595?

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

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

Linux \>= 967caa3d37c078e5b95a32094657e6a4cad145f0, \< a0501201751034ebe7a22bd9483ed28fea1cd213; \>= c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8, \< 05d9d7b66836d87c914f8fdd4b062b78e373458d; \>= c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8, \< 3c453e8cc672de1f9c662948dba43176bc68d7f0; 8c91c60858473731bcdaf04fda99fcbcf84420d4; 8256c1211dc6fa606269aa043b6e294247820b31; \>= 6.8.7, \< 6.8.12; \>= 6.6.28, \< 6.7; Linux 6.9.

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

Yes. Fixed in Linux 05d9d7b66836d87c914f8fdd4b062b78e373458d, Linux 3c453e8cc672de1f9c662948dba43176bc68d7f0, Linux 6.8.12, Linux 6.7. Upgrade Linux to 6.7 or later.

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

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/a0501201751034ebe7a22bd9483ed28fea1cd213>
- patch: <https://git.kernel.org/stable/c/05d9d7b66836d87c914f8fdd4b062b78e373458d>
- patch: <https://git.kernel.org/stable/c/3c453e8cc672de1f9c662948dba43176bc68d7f0>

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

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