# CVE-2024-35959: net/mlx5e: Fix mlx5e\_priv\_init() cleanup flow

> 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)
- **CWE:** CWE-459
- **Published:** 2024-05-20T09:41:51.244Z
- **Modified:** 2026-06-17T07:35:48.947Z

## Who should check

- Anyone running Linux \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< ad26f26abd353113dea4e8d5ebadccdab9b61e76; \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f3; \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< 6bd77865fda662913dcb5722a66a773840370aa7; \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< ecb829459a841198e142f72fadab56424ae96519
- Anyone running Linux 5.18

## Description

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

net/mlx5e: Fix mlx5e\_priv\_init() cleanup flow

When mlx5e\_priv\_init() fails, the cleanup flow calls mlx5e\_selq\_cleanup which
calls mlx5e\_selq\_apply() that assures that the \`priv-\>state\_lock\` is held using
lockdep\_is\_held().

Acquire the state\_lock in mlx5e\_selq\_cleanup().

Kernel log:
=============================
WARNING: suspicious RCU usage
6.8.0-rc3\_net\_next\_841a9b5 \#1 Not tainted
-----------------------------
drivers/net/ethernet/mellanox/mlx5/core/en/selq.c:124 suspicious rcu\_dereference\_protected() usage!

other info that might help us debug this:

rcu\_scheduler\_active = 2, debug\_locks = 1
2 locks held by systemd-modules/293:
 \#0: ffffffffa05067b0 (devices\_rwsem){++++}-{3:3}, at: ib\_register\_client+0x109/0x1b0 \[ib\_core\]
 \#1: ffff8881096c65c0 (&device-\>client\_data\_rwsem){++++}-{3:3}, at: add\_client\_context+0x104/0x1c0 \[ib\_core\]

stack backtrace:
CPU: 4 PID: 293 Comm: systemd-modules Not tainted 6.8.0-rc3\_net\_next\_841a9b5 \#1
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
Call Trace:
 \<TASK\>
 dump\_stack\_lvl+0x8a/0xa0
 lockdep\_rcu\_suspicious+0x154/0x1a0
 mlx5e\_selq\_apply+0x94/0xa0 \[mlx5\_core\]
 mlx5e\_selq\_cleanup+0x3a/0x60 \[mlx5\_core\]
 mlx5e\_priv\_init+0x2be/0x2f0 \[mlx5\_core\]
 mlx5\_rdma\_setup\_rn+0x7c/0x1a0 \[mlx5\_core\]
 rdma\_init\_netdev+0x4e/0x80 \[ib\_core\]
 ? mlx5\_rdma\_netdev\_free+0x70/0x70 \[mlx5\_core\]
 ipoib\_intf\_init+0x64/0x550 \[ib\_ipoib\]
 ipoib\_intf\_alloc+0x4e/0xc0 \[ib\_ipoib\]
 ipoib\_add\_one+0xb0/0x360 \[ib\_ipoib\]
 add\_client\_context+0x112/0x1c0 \[ib\_core\]
 ib\_register\_client+0x166/0x1b0 \[ib\_core\]
 ? 0xffffffffa0573000
 ipoib\_init\_module+0xeb/0x1a0 \[ib\_ipoib\]
 do\_one\_initcall+0x61/0x250
 do\_init\_module+0x8a/0x270
 init\_module\_from\_file+0x8b/0xd0
 idempotent\_init\_module+0x17d/0x230
 \_\_x64\_sys\_finit\_module+0x61/0xb0
 do\_syscall\_64+0x71/0x140
 entry\_SYSCALL\_64\_after\_hwframe+0x46/0x4e
 \</TASK\>

## Affected and fixed versions

- Linux: \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< ad26f26abd353113dea4e8d5ebadccdab9b61e76; \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f3; \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< 6bd77865fda662913dcb5722a66a773840370aa7; \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< ecb829459a841198e142f72fadab56424ae96519 (cvelist)
- Linux: 5.18 (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-2024-35959. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-35959.md
Affected: Linux >= 8bf30be75069d6080659de9a28565c048f6cef9b, < ad26f26abd353113dea4e8d5ebadccdab9b61e76; >= 8bf30be75069d6080659de9a28565c048f6cef9b, < f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f3; >= 8bf30be75069d6080659de9a28565c048f6cef9b, < 6bd77865fda662913dcb5722a66a773840370aa7; >= 8bf30be75069d6080659de9…
Fixed in: Linux 6bd77865fda662913dcb5722a66a773840370aa7

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

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

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

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

Linux \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< ad26f26abd353113dea4e8d5ebadccdab9b61e76; \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f3; \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< 6bd77865fda662913dcb5722a66a773840370aa7; \>= 8bf30be75069d6080659de9a28565c048f6cef9b, \< ecb829459a841198e142f72fadab56424ae96519; Linux 5.18.

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

Yes. Fixed in Linux 6bd77865fda662913dcb5722a66a773840370aa7. No fix listed yet: follow the vendor advisory.

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

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/ad26f26abd353113dea4e8d5ebadccdab9b61e76>
- patch: <https://git.kernel.org/stable/c/f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f3>
- patch: <https://git.kernel.org/stable/c/6bd77865fda662913dcb5722a66a773840370aa7>
- patch: <https://git.kernel.org/stable/c/ecb829459a841198e142f72fadab56424ae96519>

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

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