Skip to main content
Network Thinking Solutions Logo

CVE-2024-36937

Linux kernel: xdp: use flags field to disambiguate broadcast redirect

All CVEs
CVE-2024-36937Published 5/30/2024

Linux kernel: xdp: use flags field to disambiguate broadcast redirect

Vendor advisory
CVSS5.5Medium

Overview

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.

Published
5/30/2024
Last modified
6/17/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
linux kernel
linux
≥ 5.14, < 5.15.159

Verify advisory

Source
linux kernel
linux
≥ 5.16, < 6.1.91

Verify advisory

Source
linux kernel
linux
≥ 6.2, < 6.6.31

Verify advisory

Source
linux kernel
linux
≥ 6.7, < 6.8.10

Verify advisory

Source
linux kernel
linux
6.9

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
Linux
Linux
≥ e624d4ed4aa8cc3c69d1359b0aaea539203ed266, < 12481f30128fbebc2eeb55eb2d56390fdfa30c5e

Verify advisory

Source
Linux
Linux
≥ e624d4ed4aa8cc3c69d1359b0aaea539203ed266, < 272bfb019f3cc018f654b992115774e77b4f3ffc

Verify advisory

Source
Linux
Linux
≥ e624d4ed4aa8cc3c69d1359b0aaea539203ed266, < e22e25820fa04ea5eaac4ef7ee200e9923f466a4

Verify advisory

Source
Linux
Linux
≥ e624d4ed4aa8cc3c69d1359b0aaea539203ed266, < 6fd81f9d333e7b3532036577b1beb74ba1323553

Verify advisory

Source
Linux
Linux
≥ e624d4ed4aa8cc3c69d1359b0aaea539203ed266, < 5bcf0dcbf9066348058b88a510c57f70f384c92c

Verify advisory

Source
Linux
Linux
5.14

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 5.5. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.