CVE-2024-36937: xdp: use flags field to disambiguate broadcast redirect
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.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel crash bug in a specialized high-speed networking path. If an affected system uses XDP/eBPF broadcast redirects, a race while destroying a destination map can cause a null pointer crash. The sources do not provide CVSS, CWE, or evidence of active exploitation.
Executive priority
Treat as a targeted reliability risk for Linux networking infrastructure using XDP/eBPF, especially load balancers, packet processing, or high-performance edge systems. Patch through normal kernel maintenance, with higher urgency where XDP broadcast redirect is deployed.
Technical view
XDP broadcast redirect used the redirect map pointer to distinguish broadcast from single-target redirect. If bpf_clear_redirect_map() cleared that pointer before xdp_do_redirect(), the code could treat the redirect as single-target and pass NULL to dev_map_enqueue(), causing a crash. The fix uses the BPF_F_BROADCAST flag for disambiguation.
Likely exposure
Most relevant exposure is Linux systems running affected kernels with XDP/eBPF programs using bpf_redirect_map() broadcast redirects. General Linux hosts without XDP/eBPF packet redirect usage appear less likely exposed, but kernel version and feature usage must be checked.
Exploitation context
The supplied sources show no KEV listing and no cited public exploitation. The described impact is a kernel crash condition triggered by a race in XDP redirect handling, not documented privilege escalation or remote code execution.
Researcher notes
Evidence is limited to the CVE record and Linux stable commit references. The bug is a race around redirect metadata lifetime and broadcast detection. No CVSS, CWE, exploit status, or distribution-specific fixed package versions are included in the supplied bundle.
Mitigation direction
Update affected Linux kernels using vendor packages or referenced stable fixes.
Check distribution advisories for the exact fixed kernel version.
Prioritize systems using XDP, eBPF networking, or devmap redirects.
Temporarily reduce affected XDP broadcast redirect usage if patching is delayed.
Track kernel fleet versions against the CVE record and stable commits.
Validation and detection
Inventory Linux kernel versions across exposed and production hosts.
Identify hosts running XDP or eBPF networking programs.
Review whether bpf_redirect_map() broadcast redirect is used.
Confirm patched kernels include one of the referenced stable fixes.
Monitor for unexplained kernel crashes on XDP-enabled systems.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-36937 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.