Skip to content
Heist/ feed
Back to feed
UnratedFix available

xdp: use flags field to disambiguate broadcast redirect

Type: advisorySources: OSV

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 '

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.159, 6.1.91, 6.6.31, 6.8.10
CVEs
CVE-2024-36937
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 17:51 UTC · Revision 1

Source evidence

xdp: use flags field to disambiguate broadcast redirect

core-osv · Original source

Published 30 May 2024, 15:29 UTC

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 '

osv:CVE-2024-36937

Kernel

Fixed versions: 5.15.159, 6.1.91, 6.6.31, 6.8.10

Complete source record
{
  "id": "624f386ffb78bb269f998acae0533b017e0e6377fb8a1255f85970a58fef97ca",
  "url": "https://osv.dev/vulnerability/CVE-2024-36937",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "xdp: use flags field to disambiguate broadcast redirect",
    "summary": "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 '",
    "evidence": "osv:CVE-2024-36937",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.159",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.91",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.31",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.8.10",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-36937",
      "aliases": [
        "CVE-2024-36937"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "e624d4ed4aa8cc3c69d1359b0aaea539203ed266"
                },
                {
                  "fixed": "12481f30128fbebc2eeb55eb2d56390fdfa30c5e"
                },
                {
                  "fixed": "272bfb019f3cc018f654b992115774e77b4f3ffc"
                },
                {
                  "fixed": "e22e25820fa04ea5eaac4ef7ee200e9923f466a4"
                },
                {
                  "fixed": "6fd81f9d333e7b3532036577b1beb74ba1323553"
                },
                {
                  "fixed": "5bcf0dcbf9066348058b88a510c57f70f384c92c"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-36937.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.14.0"
                },
                {
                  "fixed": "5.15.159"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.91"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.31"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.8.10"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-36937.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.277661441Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/12481f30128fbebc2eeb55eb2d56390fdfa30c5e",
        "https://git.kernel.org/stable/c/272bfb019f3cc018f654b992115774e77b4f3ffc",
        "https://git.kernel.org/stable/c/5bcf0dcbf9066348058b88a510c57f70f384c92c",
        "https://git.kernel.org/stable/c/6fd81f9d333e7b3532036577b1beb74ba1323553",
        "https://git.kernel.org/stable/c/e22e25820fa04ea5eaac4ef7ee200e9923f466a4",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/36xxx/CVE-2024-36937.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-36937",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/36xxx/CVE-2024-36937.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-36937",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 505504,
  "published_at": "2024-05-30T15:29:26.353+00:00"
}