FlawAtlas
Search the atlas
UBUNTU-CVE-2024-36937 Moderate

UBUNTU-CVE-2024-36937

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.

Exploit probability Not scored
Published May 30, 2024
Required by Not available
Last source change August 17, 2026

02 / AFFECTED SOFTWARE

Affected packages

Ubuntu:24.04:LTS linux-gke

5 explicit affected versions

Ubuntu:Pro:Realtime:22.04:LTS linux-intel-iot-realtime

29 explicit affected versions

Ubuntu:22.04:LTS linux-azure-fde-5.19

3 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency-hwe-6.8

1 explicit affected versions

Ubuntu:22.04:LTS linux-ibm-6.8

1 explicit affected versions

Ubuntu:22.04:LTS linux-starfive-6.5

11 explicit affected versions

Ubuntu:20.04:LTS linux-intel-iotg-5.15

33 explicit affected versions

Ubuntu:22.04:LTS linux-ibm

47 explicit affected versions

Ubuntu:18.04:LTS linux-oem

50 explicit affected versions

Ubuntu:18.04:LTS linux-aws-5.0

6 explicit affected versions

Ubuntu:20.04:LTS linux-aws-5.11

12 explicit affected versions

Ubuntu:22.04:LTS linux-oem-6.5

19 explicit affected versions

Ubuntu:20.04:LTS linux-raspi2

6 explicit affected versions

Ubuntu:22.04:LTS linux

56 explicit affected versions

Ubuntu:24.04:LTS linux-riscv

8 explicit affected versions

Ubuntu:22.04:LTS linux-gkeop

42 explicit affected versions

Ubuntu:22.04:LTS linux-azure

52 explicit affected versions

Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15

42 explicit affected versions

Ubuntu:22.04:LTS linux-riscv-6.5

10 explicit affected versions

Ubuntu:24.04:LTS linux-oem-6.8

7 explicit affected versions

Ubuntu:22.04:LTS linux-gke

49 explicit affected versions

Ubuntu:22.04:LTS linux-azure-5.19

7 explicit affected versions

Ubuntu:22.04:LTS linux-raspi

48 explicit affected versions

Ubuntu:22.04:LTS linux-oracle-6.8

2 explicit affected versions

Ubuntu:22.04:LTS linux-azure-fde-6.2

10 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-6.5

13 explicit affected versions

Ubuntu:24.04:LTS linux-nvidia

4 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.14

35 explicit affected versions

Ubuntu:Pro:FIPS-updates:22.04:LTS linux-gcp-fips

9 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-tegra

15 explicit affected versions

Ubuntu:20.04:LTS linux-gke-5.15

18 explicit affected versions

Ubuntu:Pro:FIPS-updates:22.04:LTS linux-azure-fips

10 explicit affected versions

Ubuntu:22.04:LTS linux-azure-fde

35 explicit affected versions

Ubuntu:24.04:LTS linux-oracle

7 explicit affected versions

Ubuntu:20.04:LTS linux-aws-5.13

13 explicit affected versions

Ubuntu:20.04:LTS linux-aws-5.8

4 explicit affected versions

Ubuntu:20.04:LTS linux-riscv

12 explicit affected versions

Ubuntu:16.04:LTS linux-hwe-edge

23 explicit affected versions

Ubuntu:24.04:LTS linux

11 explicit affected versions

Ubuntu:20.04:LTS linux-hwe-5.8

21 explicit affected versions

Ubuntu:20.04:LTS linux-hwe-5.13

16 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency-hwe-6.2

10 explicit affected versions

Ubuntu:24.04:LTS linux-aws

9 explicit affected versions

Ubuntu:18.04:LTS linux-oracle-5.0

7 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.13

12 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency-hwe-6.5

13 explicit affected versions

Ubuntu:20.04:LTS linux-riscv-5.15

40 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.11

12 explicit affected versions

Ubuntu:22.04:LTS linux-azure-6.5

14 explicit affected versions

Ubuntu:20.04:LTS linux-intel-5.13

7 explicit affected versions

Ubuntu:22.04:LTS linux-oracle-6.5

13 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.11

12 explicit affected versions

Ubuntu:Pro:Realtime:22.04:LTS linux-realtime-6.8

2 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-tegra-igx

10 explicit affected versions

Ubuntu:22.04:LTS linux-azure-6.8

3 explicit affected versions

Ubuntu:18.04:LTS linux-gke-5.4

37 explicit affected versions

Ubuntu:20.04:LTS linux-azure-fde

26 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.10

26 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.13

13 explicit affected versions

Ubuntu:22.04:LTS linux-xilinx-zynqmp

6 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.6

29 explicit affected versions

Ubuntu:18.04:LTS linux-gcp-5.3

13 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency

53 explicit affected versions

Ubuntu:24.04:LTS linux-nvidia-lowlatency

1 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-6.8

2 explicit affected versions

Ubuntu:22.04:LTS linux-aws

51 explicit affected versions

Ubuntu:Pro:FIPS-updates:22.04:LTS linux-aws-fips

13 explicit affected versions

Ubuntu:18.04:LTS linux-gke-4.15

33 explicit affected versions

Ubuntu:22.04:LTS linux-riscv

23 explicit affected versions

Ubuntu:18.04:LTS linux-aws-5.3

10 explicit affected versions

Ubuntu:Pro:FIPS-updates:24.04:LTS linux-fips

1 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-5.19

11 explicit affected versions

Ubuntu:Nvidia-BlueField:24.04:LTS linux-bluefield

11 explicit affected versions

Ubuntu:20.04:LTS linux-hwe-5.11

12 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.8

7 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-6.2

12 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.15

40 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia

34 explicit affected versions

Ubuntu:22.04:LTS linux-oracle

50 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency-hwe-5.19

10 explicit affected versions

Ubuntu:22.04:LTS linux-oem-5.17

26 explicit affected versions

Ubuntu:24.04:LTS linux-azure

9 explicit affected versions

Ubuntu:Pro:FIPS-preview:22.04:LTS linux-azure-fips

1 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-6.8

2 explicit affected versions

Ubuntu:24.04:LTS linux-raspi

10 explicit affected versions

Ubuntu:22.04:LTS linux-azure-6.2

13 explicit affected versions

Ubuntu:24.04:LTS linux-ibm

9 explicit affected versions

Ubuntu:22.04:LTS linux-oem-6.0

16 explicit affected versions

Ubuntu:22.04:LTS linux-kvm

53 explicit affected versions

Ubuntu:24.04:LTS linux-gcp

10 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.15

41 explicit affected versions

Ubuntu:Pro:FIPS-preview:22.04:LTS linux-aws-fips

2 explicit affected versions

Ubuntu:20.04:LTS linux-gke

51 explicit affected versions

Ubuntu:Pro:Realtime:24.04:LTS linux-raspi-realtime

7 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.13

12 explicit affected versions

Ubuntu:22.04:LTS linux-intel-iotg

39 explicit affected versions

Ubuntu:22.04:LTS linux-oem-6.1

27 explicit affected versions

Ubuntu:Nvidia-BlueField:22.04:LTS linux-bluefield

25 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-6.8

3 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-5.19

8 explicit affected versions

Ubuntu:Pro:FIPS-updates:22.04:LTS linux-fips

14 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.8

5 explicit affected versions

Ubuntu:22.04:LTS linux-riscv-5.19

8 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-6.2

10 explicit affected versions

Ubuntu:Pro:Realtime:24.04:LTS linux-realtime

6 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.11

13 explicit affected versions

Ubuntu:22.04:LTS linux-starfive-5.19

7 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.15

44 explicit affected versions

Ubuntu:20.04:LTS linux-riscv-5.8

10 explicit affected versions

Ubuntu:20.04:LTS linux-nvidia-tegra-5.15

12 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.13

12 explicit affected versions

Ubuntu:18.04:LTS linux-azure

44 explicit affected versions

Ubuntu:18.04:LTS linux-azure-5.3

16 explicit affected versions

Ubuntu:22.04:LTS linux-starfive-6.2

3 explicit affected versions

Ubuntu:20.04:LTS linux-riscv-5.11

13 explicit affected versions

Ubuntu:20.04:LTS linux-gkeop-5.15

39 explicit affected versions

Ubuntu:18.04:LTS linux-gkeop-5.4

37 explicit affected versions

Ubuntu:24.04:LTS linux-lowlatency

10 explicit affected versions

Ubuntu:22.04:LTS linux-aws-6.5

14 explicit affected versions

Ubuntu:22.04:LTS linux-riscv-6.8

2 explicit affected versions

Ubuntu:18.04:LTS linux-gcp

38 explicit affected versions

Ubuntu:20.04:LTS linux-hwe-5.15

42 explicit affected versions

Ubuntu:18.04:LTS linux-oracle-5.3

9 explicit affected versions

Ubuntu:20.04:LTS linux-aws-5.15

42 explicit affected versions

Ubuntu:22.04:LTS linux-gcp

50 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-6.2

7 explicit affected versions

Ubuntu:20.04:LTS linux-ibm-5.15

23 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.8

4 explicit affected versions

Ubuntu:Pro:FIPS-preview:22.04:LTS linux-fips

1 explicit affected versions

Ubuntu:Pro:FIPS-preview:22.04:LTS linux-gcp-fips

1 explicit affected versions

Ubuntu:Pro:Realtime:22.04:LTS linux-realtime

48 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-6.5

13 explicit affected versions

Ubuntu:18.04:LTS linux-hwe

43 explicit affected versions

Ubuntu:22.04:LTS linux-aws-5.19

10 explicit affected versions

Ubuntu:22.04:LTS linux-allwinner-5.19

8 explicit affected versions

Ubuntu:22.04:LTS linux-aws-6.2

14 explicit affected versions

Ubuntu:18.04:LTS linux-azure-edge

4 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-6.5

11 explicit affected versions

Ubuntu:22.04:LTS linux-realtime

1 explicit affected versions

Ubuntu:22.04:LTS linux-aws-6.8

3 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities UBUNTU-CVE-2024-36937

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.

View original source

05 / REFERENCES

Further evidence