# CVE-2024-38608: net/mlx5e: Fix netif state handling

> 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.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-06-19T13:56:10.614Z
- **Modified:** 2026-10-30T13:17:29.110Z

## Who should check

- Anyone running Linux \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< 96e3eeccea9b55ca9c6a18a5a59ee3d6f12e0fb3; \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< 70eca80d98a44f47cd1633d0c20bda8ae546b4d1; \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< f7e6cfb864a53af71c5cc904f1cc22215d68f5c6; \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< 3d5918477f94e4c2f064567875c475468e264644
- Anyone running Linux 4.12

## Description

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

net/mlx5e: Fix netif state handling

mlx5e\_suspend cleans resources only if netif\_device\_present() returns
true. However, mlx5e\_resume changes the state of netif, via
mlx5e\_nic\_enable, only if reg\_state == NETREG\_REGISTERED.
In the below case, the above leads to NULL-ptr Oops\[1\] and memory
leaks:

mlx5e\_probe
 \_mlx5e\_resume
  mlx5e\_attach\_netdev
   mlx5e\_nic\_enable  \<-- netdev not reg, not calling netif\_device\_attach()
  register\_netdev \<-- failed for some reason.
ERROR\_FLOW:
 \_mlx5e\_suspend \<-- netif\_device\_present return false, resources aren't freed :(

Hence, clean resources in this case as well.

\[1\]
BUG: kernel NULL pointer dereference, address: 0000000000000000
PGD 0 P4D 0
Oops: 0010 \[\#1\] SMP
CPU: 2 PID: 9345 Comm: test-ovs-ct-gen Not tainted 6.5.0\_for\_upstream\_min\_debug\_2023\_09\_05\_16\_01 \#1
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
RIP: 0010:0x0
Code: Unable to access opcode bytes at0xffffffffffffffd6.
RSP: 0018:ffff888178aaf758 EFLAGS: 00010246
Call Trace:
 \<TASK\>
 ? \_\_die+0x20/0x60
 ? page\_fault\_oops+0x14c/0x3c0
 ? exc\_page\_fault+0x75/0x140
 ? asm\_exc\_page\_fault+0x22/0x30
 notifier\_call\_chain+0x35/0xb0
 blocking\_notifier\_call\_chain+0x3d/0x60
 mlx5\_blocking\_notifier\_call\_chain+0x22/0x30 \[mlx5\_core\]
 mlx5\_core\_uplink\_netdev\_event\_replay+0x3e/0x60 \[mlx5\_core\]
 mlx5\_mdev\_netdev\_track+0x53/0x60 \[mlx5\_ib\]
 mlx5\_ib\_roce\_init+0xc3/0x340 \[mlx5\_ib\]
 \_\_mlx5\_ib\_add+0x34/0xd0 \[mlx5\_ib\]
 mlx5r\_probe+0xe1/0x210 \[mlx5\_ib\]
 ? auxiliary\_match\_id+0x6a/0x90
 auxiliary\_bus\_probe+0x38/0x80
 ? driver\_sysfs\_add+0x51/0x80
 really\_probe+0xc9/0x3e0
 ? 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+0x637/0x840
 \_\_auxiliary\_device\_add+0x3b/0xa0
 add\_adev+0xc9/0x140 \[mlx5\_core\]
 mlx5\_rescan\_drivers\_locked+0x22a/0x310 \[mlx5\_core\]
 mlx5\_register\_device+0x53/0xa0 \[mlx5\_core\]
 mlx5\_init\_one\_devl\_locked+0x5c4/0x9c0 \[mlx5\_core\]
 mlx5\_init\_one+0x3b/0x60 \[mlx5\_core\]
 probe\_one+0x44c/0x730 \[mlx5\_core\]
 local\_pci\_probe+0x3e/0x90
 pci\_device\_probe+0xbf/0x210
 ? kernfs\_create\_link+0x5d/0xa0
 ? sysfs\_do\_create\_link\_sd+0x60/0xc0
 really\_probe+0xc9/0x3e0
 ? 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
 pci\_bus\_add\_device+0x54/0x80
 pci\_iov\_add\_virtfn+0x2e6/0x320
 sriov\_enable+0x208/0x420
 mlx5\_core\_sriov\_configure+0x9e/0x200 \[mlx5\_core\]
 sriov\_numvfs\_store+0xae/0x1a0
 kernfs\_fop\_write\_iter+0x10c/0x1a0
 vfs\_write+0x291/0x3c0
 ksys\_write+0x5f/0xe0
 do\_syscall\_64+0x3d/0x90
 entry\_SYSCALL\_64\_after\_hwframe+0x46/0xb0
 CR2: 0000000000000000
 ---\[ end trace 0000000000000000  \]---

## Affected and fixed versions

- Linux: \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< 96e3eeccea9b55ca9c6a18a5a59ee3d6f12e0fb3; \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< 70eca80d98a44f47cd1633d0c20bda8ae546b4d1; \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< f7e6cfb864a53af71c5cc904f1cc22215d68f5c6; \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< 3d5918477f94e4c2f064567875c475468e264644 (cvelist)
- Linux: 4.12 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2024-38608.md
Affected: Linux >= 2c3b5beec46ab0d77c94828eb15170b333ae769a, < 96e3eeccea9b55ca9c6a18a5a59ee3d6f12e0fb3; >= 2c3b5beec46ab0d77c94828eb15170b333ae769a, < 70eca80d98a44f47cd1633d0c20bda8ae546b4d1; >= 2c3b5beec46ab0d77c94828eb15170b333ae769a, < f7e6cfb864a53af71c5cc904f1cc22215d68f5c6; >= 2c3b5beec46ab0d77c94828…
Fixed in: Linux 96e3eeccea9b55ca9c6a18a5a59ee3d6f12e0fb3, Linux 70eca80d98a44f47cd1633d0c20bda8ae546b4d1, Linux 3d5918477f94e4c2f064567875c475468e264644

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

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

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

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

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

Linux \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< 96e3eeccea9b55ca9c6a18a5a59ee3d6f12e0fb3; \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< 70eca80d98a44f47cd1633d0c20bda8ae546b4d1; \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< f7e6cfb864a53af71c5cc904f1cc22215d68f5c6; \>= 2c3b5beec46ab0d77c94828eb15170b333ae769a, \< 3d5918477f94e4c2f064567875c475468e264644; Linux 4.12.

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

Yes. Fixed in Linux 96e3eeccea9b55ca9c6a18a5a59ee3d6f12e0fb3, Linux 70eca80d98a44f47cd1633d0c20bda8ae546b4d1, Linux 3d5918477f94e4c2f064567875c475468e264644. Upgrade Linux to 3d5918477f94e4c2f064567875c475468e264644 or later.

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

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/f7e6cfb864a53af71c5cc904f1cc22215d68f5c6>
- patch: <https://git.kernel.org/stable/c/3d5918477f94e4c2f064567875c475468e264644>
- other: <https://git.kernel.org/stable/c/96e3eeccea9b55ca9c6a18a5a59ee3d6f12e0fb3>
- other: <https://git.kernel.org/stable/c/70eca80d98a44f47cd1633d0c20bda8ae546b4d1>

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

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