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

Published Jul 29, 2024
·
Updated

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 "I40EINREMOVE" to block modifying the XDP program while the driver is being removed. Unfortunately, such a change is useful only if the ".ndobpf()" 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 unregisternetdevicemanynotify+0x7a9/0x870 [...] [ +0.010959] RIP: 0010:unregisternetdevicemanynotify+0x7a9/0x870 [...] [ +0.002726] Call Trace: [ +0.002457] <TASK> [ +0.002119] ? warn+0x80/0x120 [ +0.003245] ? unregisternetdevicemanynotify+0x7a9/0x870 [ +0.005586] ? reportbug+0x164/0x190 [ +0.003678] ? handlebug+0x3c/0x80 [ +0.003503] ? excinvalidop+0x17/0x70 [ +0.003846] ? asmexcinvalidop+0x1a/0x20 [ +0.004200] ? unregisternetdevicemanynotify+0x7a9/0x870 [ +0.005579] ? unregisternetdevicemanynotify+0x3cc/0x870 [ +0.005586] unregisternetdevicequeue+0xf7/0x140 [ +0.004806] unregisternetdev+0x1c/0x30 [ +0.003933] i40evsirelease+0x87/0x2f0 [i40e] [ +0.004604] i40eremove+0x1a1/0x420 [i40e] [ +0.004220] pcideviceremove+0x3f/0xb0 [ +0.003943] devicereleasedriverinternal+0x19f/0x200 [ +0.005243] driverdetach+0x48/0x90 [ +0.003586] busremovedriver+0x6d/0xf0 [ +0.003939] pciunregisterdriver+0x2e/0xb0 [ +0.004278] i40eexitmodule+0x10/0x5f0 [i40e] [ +0.004570] dosysdeletemodule.isra.0+0x197/0x310 [ +0.005153] dosyscall64+0x85/0x170 [ +0.003684] ? syscallexittousermode+0x69/0x220 [ +0.004886] ? dosyscall64+0x95/0x170 [ +0.003851] ? excpagefault+0x7e/0x180 [ +0.003932] entrySYSCALL64afterhwframe+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 ORIGRAX: 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 "I40EINREMOVE" is set. Also, move testing "I40EINREMOVE" flag to the beginning of XDPSETUP callback to avoid unnecessary operations and checks.

Affected Software

21 affected componentsFixes available
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=5.15.20<5.15.163
Linux Linux kernel>=5.16.6<5.17
Linux Linux kernel>=5.17.1<6.1.100
Linux Linux kernel>=6.2<6.6.41
Linux Linux kernel>=6.7<6.9.10
Linux Linux kernel=5.17
Linux Linux kernel=5.17-rc3
Linux Linux kernel=5.17-rc4
Linux Linux kernel=5.17-rc5
Linux Linux kernel=5.17-rc6
Linux Linux kernel=5.17-rc7
Linux Linux kernel=5.17-rc8
Linux Linux kernel=6.10-rc1
Linux Linux kernel=6.10-rc2
Linux Linux kernel=6.10-rc3
Linux Linux kernel=6.10-rc4
Linux Linux kernel=6.10-rc5
Linux Linux kernel=6.10-rc6
Linux Linux kernel=6.10-rc7

Event History

Jul 29, 2024
CVE Published
via MITRE·02:32 PM
Data Sourced
via MITRE·02:32 PM
Description
Data Sourced
via NVD·03:15 PM
Description
Data Sourced
via NVD·03:15 PM
RemedySeverityAffected Software
Apr 27, 2025
Data Sourced
via Ubuntu·12:31 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-41047?

The severity of CVE-2024-41047 has been classified as moderate.

2

How do I fix CVE-2024-41047?

To fix CVE-2024-41047, update your Linux kernel to a patched version such as 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.128-1, 6.12.12-1, or 6.12.13-1.

3

Which versions of the Linux kernel are affected by CVE-2024-41047?

CVE-2024-41047 affects multiple versions of the Linux kernel, specifically versions prior to the patches mentioned above.

4

Is CVE-2024-41047 a local or remote vulnerability?

CVE-2024-41047 is considered a local vulnerability, requiring local access to exploit.

5

What type of systems are impacted by CVE-2024-41047?

CVE-2024-41047 impacts systems running specific versions of the Linux kernel on Debian.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203