CVE-2024-50041

i40e: Fix macvlan leak by synchronizing access to mac_filter_hash

8.8 high EPSS 0.23%

Published 21 Oct 2024 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2024-50041

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-50041 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

i40e: Fix macvlan leak by synchronizing access to mac_filter_hash

This patch addresses a macvlan leak issue in the i40e driver caused by concurrent access to vsi->mac_filter_hash. The leak occurs when multiple threads attempt to modify the mac_filter_hash simultaneously, leading to inconsistent state and potential memory leaks.

To fix this, we now wrap the calls to i40e_del_mac_filter() and zeroing vf->default_lan_addr.addr with spin_lock/unlock_bh(&vsi->mac_filter_hash_lock), ensuring atomic operations and preventing concurrent access.

Additionally, we add lockdep_assert_held(&vsi->mac_filter_hash_lock) in i40e_add_mac_filter() to help catch similar issues in the future.

Reproduction steps: 1. Spawn VFs and configure port vlan on them. 2. Trigger concurrent macvlan operations (e.g., adding and deleting portvlan and/or mac filters). 3. Observe the potential memory leak and inconsistent state in the mac_filter_hash.

This synchronization ensures the integrity of the mac_filter_hash and prevents the described leak.

Severity (CVSS)

8.8 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
changed: the damage reaches other components, such as the host of a container or other users
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.23%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.5% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 22 Oct 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from ddec6cbbe22781d17965f1e6386e5a6363c058d2, before 9db6ce9e2738b05a3672aff4d42169cf3bb5a3e3
affected from fed0d9f13266a22ce1fc9a97521ef9cdc6271a23, before 9a9747288ba0a9ad4f5c9877f18dd245770ad64e
affected from fed0d9f13266a22ce1fc9a97521ef9cdc6271a23, before 703c4d820b31bcadf465288d5746c53445f02a55
affected from fed0d9f13266a22ce1fc9a97521ef9cdc6271a23, before 8831abff1bd5b6bc8224f0c0671f46fbd702b5b2
affected from fed0d9f13266a22ce1fc9a97521ef9cdc6271a23, before dac6c7b3d33756d6ce09f00a96ea2ecd79fae9fb
affected 8bfcbaa379694e05290fcff21f4bd40afcf88776
affected from 5.15.54, before 5.15.168
affected from 5.18.11, before 5.19
Other versions: unaffected
Linux
affected 5.19
unaffected before 5.19
unaffected from 5.15.168 up to and including 5.15.*
unaffected from 6.1.113 up to and including 6.1.*
unaffected from 6.6.57 up to and including 6.6.*
unaffected from 6.11.4 up to and including 6.11.*
unaffected 6.12 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-50041 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-50041

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-50041
trivy image --scanners vuln IMAGE | grep CVE-2024-50041

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-50041 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.