CVE-2024-36937

xdp: use flags field to disambiguate broadcast redirect

No CVSS score yet EPSS 0.22%

Published 30 May 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2024-36937

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-36937 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:

xdp: use flags field to disambiguate broadcast redirect

When redirecting a packet using XDP, the bpf_redirect_map() helper will set up the redirect destination information in struct bpf_redirect_info (using the __bpf_xdp_redirect_map() helper function), and the xdp_do_redirect() function will read this information after the XDP program returns and pass the frame on to the right redirect destination.

When using the BPF_F_BROADCAST flag to do multicast redirect to a whole map, __bpf_xdp_redirect_map() sets the 'map' pointer in struct bpf_redirect_info to point to the destination map to be broadcast. And xdp_do_redirect() reacts to the value of this map pointer to decide whether it's dealing with a broadcast or a single-value redirect. However, if the destination map is being destroyed before xdp_do_redirect() is called, the map pointer will be cleared out (by bpf_clear_redirect_map()) without waiting for any XDP programs to stop running. This causes xdp_do_redirect() to think that the redirect was to a single target, but the target pointer is also NULL (since broadcast redirects don't have a single target), so this causes a crash when a NULL pointer is passed to dev_map_enqueue().

To fix this, change xdp_do_redirect() to react directly to the presence of the BPF_F_BROADCAST flag in the 'flags' value in struct bpf_redirect_info to disambiguate between a single-target and a broadcast redirect. And only read the 'map' pointer if the broadcast flag is set, aborting if that has been cleared out in the meantime. This prevents the crash, while keeping the atomic (cmpxchg-based) clearing of the map pointer itself, and without adding any more checks in the non-broadcast fast path.

Exploitation

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

The assessment of CISA (SSVC, 10 Sep 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 e624d4ed4aa8cc3c69d1359b0aaea539203ed266, before 12481f30128fbebc2eeb55eb2d56390fdfa30c5e
affected from e624d4ed4aa8cc3c69d1359b0aaea539203ed266, before 272bfb019f3cc018f654b992115774e77b4f3ffc
affected from e624d4ed4aa8cc3c69d1359b0aaea539203ed266, before e22e25820fa04ea5eaac4ef7ee200e9923f466a4
affected from e624d4ed4aa8cc3c69d1359b0aaea539203ed266, before 6fd81f9d333e7b3532036577b1beb74ba1323553
affected from e624d4ed4aa8cc3c69d1359b0aaea539203ed266, before 5bcf0dcbf9066348058b88a510c57f70f384c92c
Other versions: unaffected
Linux
affected 5.14
unaffected before 5.14
unaffected from 5.15.159 up to and including 5.15.*
unaffected from 6.1.91 up to and including 6.1.*
unaffected from 6.6.31 up to and including 6.6.*
unaffected from 6.8.10 up to and including 6.8.*
unaffected 6.9 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-36937 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-36937

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-36937
trivy image --scanners vuln IMAGE | grep CVE-2024-36937

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-36937 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.