# CVE-2024-41047: i40e: Fix XDP program unloading while removing the driver

> 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-28)
- **Published:** 2024-07-29T14:32:04.402Z
- **Modified:** 2026-06-17T07:47:09.757Z

## Who should check

- Anyone running Linux \>= b82364abc54b19829b26459989d2781fc4822c28, \< b399a68054dfb36eed121846ef5fcddba40b7740; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 4bc336b2345f1485438c0eb7246d9c8a8d09f8ff; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 5266302cb2c74d8ab0e9a69d5752fffaea70496e; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 0075b8c94d76830c7b6f018f6e4eeb0bf6465fdc; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 01fc5142ae6b06b61ed51a624f2732d6525d8ea3; 2754d83160c96ae22afff8687ddb575d3b790587; \>= 5.15.20, \< 5.15.163; \>= 5.16.6, \< 5.17
- Anyone running Linux 5.17

## Description

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

i40e: Fix XDP program unloading while removing the driver

The commit 6533e558c650 ("i40e: Fix reset path while removing
the driver") introduced a new PF state "\_\_I40E\_IN\_REMOVE" to block
modifying the XDP program while the driver is being removed.
Unfortunately, such a change is useful only if the ".ndo\_bpf()"
callback was called out of the rmmod context because unloading the
existing XDP program is also a part of driver removing procedure.
In other words, from the rmmod context the driver is expected to
unload the XDP program without reporting any errors. Otherwise,
the kernel warning with callstack is printed out to dmesg.

Example failing scenario:
 1. Load the i40e driver.
 2. Load the XDP program.
 3. Unload the i40e driver (using "rmmod" command).

The example kernel warning log:

\[  +0.004646\] WARNING: CPU: 94 PID: 10395 at net/core/dev.c:9290 unregister\_netdevice\_many\_notify+0x7a9/0x870
\[...\]
\[  +0.010959\] RIP: 0010:unregister\_netdevice\_many\_notify+0x7a9/0x870
\[...\]
\[  +0.002726\] Call Trace:
\[  +0.002457\]  \<TASK\>
\[  +0.002119\]  ? \_\_warn+0x80/0x120
\[  +0.003245\]  ? unregister\_netdevice\_many\_notify+0x7a9/0x870
\[  +0.005586\]  ? report\_bug+0x164/0x190
\[  +0.003678\]  ? handle\_bug+0x3c/0x80
\[  +0.003503\]  ? exc\_invalid\_op+0x17/0x70
\[  +0.003846\]  ? asm\_exc\_invalid\_op+0x1a/0x20
\[  +0.004200\]  ? unregister\_netdevice\_many\_notify+0x7a9/0x870
\[  +0.005579\]  ? unregister\_netdevice\_many\_notify+0x3cc/0x870
\[  +0.005586\]  unregister\_netdevice\_queue+0xf7/0x140
\[  +0.004806\]  unregister\_netdev+0x1c/0x30
\[  +0.003933\]  i40e\_vsi\_release+0x87/0x2f0 \[i40e\]
\[  +0.004604\]  i40e\_remove+0x1a1/0x420 \[i40e\]
\[  +0.004220\]  pci\_device\_remove+0x3f/0xb0
\[  +0.003943\]  device\_release\_driver\_internal+0x19f/0x200
\[  +0.005243\]  driver\_detach+0x48/0x90
\[  +0.003586\]  bus\_remove\_driver+0x6d/0xf0
\[  +0.003939\]  pci\_unregister\_driver+0x2e/0xb0
\[  +0.004278\]  i40e\_exit\_module+0x10/0x5f0 \[i40e\]
\[  +0.004570\]  \_\_do\_sys\_delete\_module.isra.0+0x197/0x310
\[  +0.005153\]  do\_syscall\_64+0x85/0x170
\[  +0.003684\]  ? syscall\_exit\_to\_user\_mode+0x69/0x220
\[  +0.004886\]  ? do\_syscall\_64+0x95/0x170
\[  +0.003851\]  ? exc\_page\_fault+0x7e/0x180
\[  +0.003932\]  entry\_SYSCALL\_64\_after\_hwframe+0x71/0x79
\[  +0.005064\] RIP: 0033:0x7f59dc9347cb
\[  +0.003648\] Code: 73 01 c3 48 8b 0d 65 16 0c 00 f7 d8 64 89 01 48 83
c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f
05 \<48\> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 35 16 0c 00 f7 d8 64 89 01 48
\[  +0.018753\] RSP: 002b:00007ffffac99048 EFLAGS: 00000206 ORIG\_RAX: 00000000000000b0
\[  +0.007577\] RAX: ffffffffffffffda RBX: 0000559b9bb2f6e0 RCX: 00007f59dc9347cb
\[  +0.007140\] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 0000559b9bb2f748
\[  +0.007146\] RBP: 00007ffffac99070 R08: 1999999999999999 R09: 0000000000000000
\[  +0.007133\] R10: 00007f59dc9a5ac0 R11: 0000000000000206 R12: 0000000000000000
\[  +0.007141\] R13: 00007ffffac992d8 R14: 0000559b9bb2f6e0 R15: 0000000000000000
\[  +0.007151\]  \</TASK\>
\[  +0.002204\] ---\[ end trace 0000000000000000 \]---

Fix this by checking if the XDP program is being loaded or unloaded.
Then, block only loading a new program while "\_\_I40E\_IN\_REMOVE" is set.
Also, move testing "\_\_I40E\_IN\_REMOVE" flag to the beginning of XDP\_SETUP
callback to avoid unnecessary operations and checks.

## Affected and fixed versions

- Linux: \>= b82364abc54b19829b26459989d2781fc4822c28, \< b399a68054dfb36eed121846ef5fcddba40b7740; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 4bc336b2345f1485438c0eb7246d9c8a8d09f8ff; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 5266302cb2c74d8ab0e9a69d5752fffaea70496e; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 0075b8c94d76830c7b6f018f6e4eeb0bf6465fdc; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 01fc5142ae6b06b61ed51a624f2732d6525d8ea3; 2754d83160c96ae22afff8687ddb575d3b790587; \>= 5.15.20, \< 5.15.163; \>= 5.16.6, \< 5.17 (cvelist)
- Linux: 5.17 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2024-41047.md
Affected: Linux >= b82364abc54b19829b26459989d2781fc4822c28, < b399a68054dfb36eed121846ef5fcddba40b7740; >= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, < 4bc336b2345f1485438c0eb7246d9c8a8d09f8ff; >= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, < 5266302cb2c74d8ab0e9a69d5752fffaea70496e; >= 6533e558c6505e94c3e0ed4…
Fixed in: Linux 4bc336b2345f1485438c0eb7246d9c8a8d09f8ff, Linux 5266302cb2c74d8ab0e9a69d5752fffaea70496e, Linux 0075b8c94d76830c7b6f018f6e4eeb0bf6465fdc, Linux 01fc5142ae6b06b61ed51a624f2732d6525d8ea3, Linux 5.15.163, Linux 5.17

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

There is no confirmed exploitation: CVE-2024-41047 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-28).

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

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

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

Linux \>= b82364abc54b19829b26459989d2781fc4822c28, \< b399a68054dfb36eed121846ef5fcddba40b7740; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 4bc336b2345f1485438c0eb7246d9c8a8d09f8ff; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 5266302cb2c74d8ab0e9a69d5752fffaea70496e; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 0075b8c94d76830c7b6f018f6e4eeb0bf6465fdc; \>= 6533e558c6505e94c3e0ed4281ed5e31ec985f4d, \< 01fc5142ae6b06b61ed51a624f2732d6525d8ea3; 2754d83160c96ae22afff8687ddb575d3b790587; \>= 5.15.20, \< 5.15.163; \>= 5.16.6, \< 5.17; Linux 5.17.

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

Yes. Fixed in Linux 4bc336b2345f1485438c0eb7246d9c8a8d09f8ff, Linux 5266302cb2c74d8ab0e9a69d5752fffaea70496e, Linux 0075b8c94d76830c7b6f018f6e4eeb0bf6465fdc, Linux 01fc5142ae6b06b61ed51a624f2732d6525d8ea3, Linux 5.15.163, Linux 5.17. Upgrade Linux to 5.17 or later.

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

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/b399a68054dfb36eed121846ef5fcddba40b7740>
- patch: <https://git.kernel.org/stable/c/4bc336b2345f1485438c0eb7246d9c8a8d09f8ff>
- patch: <https://git.kernel.org/stable/c/5266302cb2c74d8ab0e9a69d5752fffaea70496e>
- patch: <https://git.kernel.org/stable/c/0075b8c94d76830c7b6f018f6e4eeb0bf6465fdc>
- patch: <https://git.kernel.org/stable/c/01fc5142ae6b06b61ed51a624f2732d6525d8ea3>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

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

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