Vulnerability · Published May 30, 2024 · Assigned by Linux

CVE-2024-36937xdp: use flags field to disambiguate broadcast redirect

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 86.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.94-1DEBIAN-CVE-2024-36937
Debian:13linux6.8.11-1DEBIAN-CVE-2024-36937
Debian:14linux6.8.11-1DEBIAN-CVE-2024-36937
Ubuntu:22.04:LTSlinux5.15.0-118.128UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux5.15.0-118.128USN-6950-1
Ubuntu:24.04:LTSlinux6.8.0-40.40UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-aws5.15.0-1067.73UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-aws5.15.0-1067.73USN-6950-1
Ubuntu:24.04:LTSlinux-aws6.8.0-1013.14UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1013.14~22.04.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-azure5.15.0-1070.79USN-6956-1
Ubuntu:22.04:LTSlinux-azure5.15.0-1070.79UBUNTU-CVE-2024-36937
Ubuntu:24.04:LTSlinux-azure6.8.0-1012.14UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1012.14~22.04.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1070.79.1USN-6956-1
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1070.79.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-gcp5.15.0-1066.74USN-6950-1
Ubuntu:22.04:LTSlinux-gcp5.15.0-1066.74UBUNTU-CVE-2024-36937
Ubuntu:24.04:LTSlinux-gcp6.8.0-1012.13UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1012.13~22.04.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-gke5.15.0-1064.70UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-gke5.15.0-1064.70USN-6950-1
Ubuntu:24.04:LTSlinux-gke6.8.0-1008.11UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1050.57USN-6950-1
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1050.57UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-40.40~22.04.3UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-ibm5.15.0-1060.63UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-ibm5.15.0-1060.63USN-6950-2
Ubuntu:24.04:LTSlinux-ibm6.8.0-1010.10UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1010.10~22.04.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1062.68USN-6950-1
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1062.68UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-kvm5.15.0-1064.69UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-kvm5.15.0-1064.69USN-6950-1
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-118.128USN-6950-1
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-118.128UBUNTU-CVE-2024-36937
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-40.40.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-40.40.1~22.04.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1062.63UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1062.63USN-6950-1
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1011.11UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1011.11~22.04.1UBUNTU-CVE-2024-36937
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1011.11.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1027.27UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1015.15UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1010.10UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-oracle5.15.0-1065.71USN-6950-3
Ubuntu:22.04:LTSlinux-oracle5.15.0-1065.71UBUNTU-CVE-2024-36937
Ubuntu:24.04:LTSlinux-oracle6.8.0-1010.10UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1010.10~22.04.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-raspi5.15.0-1060.63USN-6950-2
Ubuntu:22.04:LTSlinux-raspi5.15.0-1060.63UBUNTU-CVE-2024-36937
Ubuntu:24.04:LTSlinux-raspi6.8.0-1009.10UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-36937
Ubuntu:24.04:LTSlinux-riscv6.8.0-40.40.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-40.40.1~22.04.1UBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-36937
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1035.39UBUNTU-CVE-2024-36937

Affected products (as reported)

VendorProductVersions
Linux Linux e624d4ed4aa8cc3c69d1359b0aaea539203ed266 – before 12481f30128fbebc2eeb55eb2d56390fdfa30c5ee624d4ed4aa8cc3c69d1359b0aaea539203ed266 – before 272bfb019f3cc018f654b992115774e77b4f3ffce624d4ed4aa8cc3c69d1359b0aaea539203ed266 – before e22e25820fa04ea5eaac4ef7ee200e9923f466a4e624d4ed4aa8cc3c69d1359b0aaea539203ed266 – before 6fd81f9d333e7b3532036577b1beb74ba1323553e624d4ed4aa8cc3c69d1359b0aaea539203ed266 – before 5bcf0dcbf9066348058b88a510c57f70f384c92c
Linux Linux 5.14

References