FlawAtlas
Search the atlas
UBUNTU-CVE-2024-46828 High

UBUNTU-CVE-2024-46828

In the Linux kernel, the following vulnerability has been resolved: sched: sch_cake: fix bulk flow accounting logic for host fairness In sch_cake, we keep track of the count of active bulk flows per host, when running in dst/src host fairness mode, which is used as the round-robin weight when iterating through flows. The count of active bulk flows is updated whenever a flow changes state. This has a peculiar interaction with the hash collision handling: when a hash collision occurs (after the set-associative hashing), the state of the hash bucket is simply updated to match the new packet that collided, and if host fairness is enabled, that also means assigning new per-host state to the flow. For this reason, the bulk flow counters of the host(s) assigned to the flow are decremented, before new state is assigned (and the counters, which may not belong to the same host anymore, are incremented again). Back when this code was introduced, the host fairness mode was always enabled, so the decrement was unconditional. When the configuration flags were introduced the *increment* was made conditional, but the *decrement* was not. Which of course can lead to a spurious decrement (and associated wrap-around to U16_MAX). AFAICT, when host fairness is disabled, the decrement and wrap-around happens as soon as a hash collision occurs (which is not that common in itself, due to the set-associative hashing). However, in most cases this is harmless, as the value is only used when host fairness mode is enabled. So in order to trigger an array overflow, sch_cake has to first be configured with host fairness disabled, and while running in this mode, a hash collision has to occur to cause the overflow. Then, the qdisc has to be reconfigured to enable host fairness, which leads to the array out-of-bounds because the wrapped-around value is retained and used as an array index. It seems that syzbot managed to trigger this, which is quite impressive in its own right. This patch fixes the issue by introducing the same conditional check on decrement as is used on increment. The original bug predates the upstreaming of cake, but the commit listed in the Fixes tag touched that code, meaning that this patch won't apply before that.

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

02 / AFFECTED SOFTWARE

Affected packages

Ubuntu:24.04:LTS linux-raspi

17 explicit affected versions

Ubuntu:24.04:LTS linux-gcp

17 explicit affected versions

Ubuntu:20.04:LTS linux-gke

51 explicit affected versions

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

14 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-5.19

8 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:18.04:LTS linux-gcp-5.3

13 explicit affected versions

Ubuntu:18.04:LTS linux-aws-5.0

6 explicit affected versions

Ubuntu:24.04:LTS linux-riscv

14 explicit affected versions

Ubuntu:22.04:LTS linux-riscv-6.5

10 explicit affected versions

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

33 explicit affected versions

Ubuntu:Pro:FIPS:20.04:LTS linux-aws-fips

1 explicit affected versions

Ubuntu:Pro:18.04:LTS linux-gcp-5.4

88 explicit affected versions

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

7 explicit affected versions

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

10 explicit affected versions

Ubuntu:22.04:LTS linux-starfive-6.5

11 explicit affected versions

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

38 explicit affected versions

Ubuntu:22.04:LTS linux-ibm

52 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-6.8

7 explicit affected versions

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

18 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-6.8

10 explicit affected versions

Ubuntu:20.04:LTS linux-azure-fde

26 explicit affected versions

Ubuntu:18.04:LTS linux-oem

50 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

61 explicit affected versions

Ubuntu:22.04:LTS linux-gkeop

47 explicit affected versions

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

68 explicit affected versions

Ubuntu:22.04:LTS linux-azure

57 explicit affected versions

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

47 explicit affected versions

Ubuntu:22.04:LTS linux-ibm-6.8

8 explicit affected versions

Ubuntu:24.04:LTS linux-oem-6.8

14 explicit affected versions

Ubuntu:22.04:LTS linux-gke

54 explicit affected versions

Ubuntu:22.04:LTS linux-azure-5.19

7 explicit affected versions

Ubuntu:22.04:LTS linux-raspi

53 explicit affected versions

Ubuntu:22.04:LTS linux-oracle-6.8

9 explicit affected versions

Ubuntu:20.04:LTS linux-kvm

95 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-6.5

13 explicit affected versions

Ubuntu:24.04:LTS linux-nvidia

11 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

14 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-tegra

18 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

15 explicit affected versions

Ubuntu:22.04:LTS linux-azure-fde

64 explicit affected versions

Ubuntu:24.04:LTS linux-oracle

14 explicit affected versions

Ubuntu:Pro:18.04:LTS linux-hwe-5.4

97 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:16.04:LTS linux-hwe-edge

23 explicit affected versions

Ubuntu:24.04:LTS linux

18 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:Pro:FIPS-updates:20.04:LTS linux-aws-fips

52 explicit affected versions

Ubuntu:24.04:LTS linux-aws

16 explicit affected versions

Ubuntu:18.04:LTS linux-oracle-5.0

7 explicit affected versions

Ubuntu:20.04:LTS linux-riscv

12 explicit affected versions

Ubuntu:20.04:LTS linux-riscv-5.15

45 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:Pro:18.04:LTS linux-azure-5.4

85 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.13

12 explicit affected versions

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

14 explicit affected versions

Ubuntu:20.04:LTS linux-gcp

100 explicit affected versions

Ubuntu:20.04:LTS linux

108 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

9 explicit affected versions

Ubuntu:20.04:LTS linux-azure

96 explicit affected versions

Ubuntu:22.04:LTS linux-azure-6.8

9 explicit affected versions

Ubuntu:24.04:LTS linux-gkeop

1 explicit affected versions

Ubuntu:18.04:LTS linux-hwe-edge

10 explicit affected versions

Ubuntu:18.04:LTS linux-gke-5.4

37 explicit affected versions

Ubuntu:22.04:LTS linux-oracle-6.5

13 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.6

29 explicit affected versions

Ubuntu:20.04:LTS linux-iot

35 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

9 explicit affected versions

Ubuntu:20.04:LTS linux-aws

100 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency

58 explicit affected versions

Ubuntu:24.04:LTS linux-nvidia-lowlatency

8 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-6.8

9 explicit affected versions

Ubuntu:Pro:18.04:LTS linux-raspi-5.4

83 explicit affected versions

Ubuntu:22.04:LTS linux-aws

56 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:20.04:LTS linux-oracle

98 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.15

45 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia

39 explicit affected versions

Ubuntu:22.04:LTS linux-oracle

55 explicit affected versions

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

10 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:22.04:LTS linux-oem-5.17

26 explicit affected versions

Ubuntu:24.04:LTS linux-azure

16 explicit affected versions

Ubuntu:20.04:LTS linux-xilinx-zynqmp

34 explicit affected versions

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

1 explicit affected versions

Ubuntu:22.04:LTS linux-azure-6.2

13 explicit affected versions

Ubuntu:24.04:LTS linux-ibm

16 explicit affected versions

Ubuntu:Pro:18.04:LTS linux-ibm-5.4

58 explicit affected versions

Ubuntu:22.04:LTS linux-oem-6.0

16 explicit affected versions

Ubuntu:22.04:LTS linux-kvm

58 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.15

46 explicit affected versions

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

3 explicit affected versions

Ubuntu:Pro:FIPS:20.04:LTS linux-azure-fips

1 explicit affected versions

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

2 explicit affected versions

Ubuntu:20.04:LTS linux-ibm

65 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.13

12 explicit affected versions

Ubuntu:22.04:LTS linux-intel-iotg

44 explicit affected versions

Ubuntu:22.04:LTS linux-oem-6.1

27 explicit affected versions

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

30 explicit affected versions

Ubuntu:Pro:FIPS:20.04:LTS linux-fips

1 explicit affected versions

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

19 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:Pro:FIPS:20.04:LTS linux-gcp-fips

1 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-6.2

10 explicit affected versions

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

13 explicit affected versions

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

13 explicit affected versions

Ubuntu:Pro:18.04:LTS linux-oracle-5.4

87 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.11

13 explicit affected versions

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

52 explicit affected versions

Ubuntu:22.04:LTS linux-starfive-5.19

7 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.15

50 explicit affected versions

Ubuntu:20.04:LTS linux-riscv-5.8

10 explicit affected versions

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

14 explicit affected versions

Ubuntu:20.04:LTS linux-riscv-5.11

13 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.13

12 explicit affected versions

Ubuntu:Pro:18.04:LTS linux-aws-5.4

87 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:22.04:LTS linux-riscv-6.8

8 explicit affected versions

Ubuntu:20.04:LTS linux-gkeop-5.15

44 explicit affected versions

Ubuntu:18.04:LTS linux-gkeop-5.4

37 explicit affected versions

Ubuntu:24.04:LTS linux-lowlatency

17 explicit affected versions

Ubuntu:22.04:LTS linux-aws-6.5

14 explicit affected versions

Ubuntu:24.04:LTS linux-xilinx

7 explicit affected versions

Ubuntu:18.04:LTS linux-gcp

38 explicit affected versions

Ubuntu:20.04:LTS linux-hwe-5.15

47 explicit affected versions

Ubuntu:18.04:LTS linux-oracle-5.3

9 explicit affected versions

Ubuntu:20.04:LTS linux-aws-5.15

47 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-5.19

11 explicit affected versions

Ubuntu:22.04:LTS linux-gcp

55 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-6.2

7 explicit affected versions

Ubuntu:20.04:LTS linux-ibm-5.15

28 explicit affected versions

Ubuntu:20.04:LTS linux-bluefield

59 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.8

4 explicit affected versions

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

53 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:Pro:FIPS-updates:20.04:LTS linux-gcp-fips

53 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:24.04:LTS linux-gke

12 explicit affected versions

Ubuntu:22.04:LTS linux-aws-6.2

14 explicit affected versions

Ubuntu:20.04:LTS linux-raspi

88 explicit affected versions

Ubuntu:18.04:LTS linux-azure-edge

4 explicit affected versions

Ubuntu:20.04:LTS linux-gkeop

77 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

10 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities UBUNTU-CVE-2024-46828

In the Linux kernel, the following vulnerability has been resolved: sched: sch_cake: fix bulk flow accounting logic for host fairness In sch_cake, we keep track of the count of active bulk flows per host, when running in dst/src host fairness mode, which is used as the round-robin weight when iterating through flows. The count of active bulk flows is updated whenever a flow changes state. This has a peculiar interaction with the hash collision handling: when a hash collision occurs (after the set-associative hashing), the state of the hash bucket is simply updated to match the new packet that collided, and if host fairness is enabled, that also means assigning new per-host state to the flow. For this reason, the bulk flow counters of the host(s) assigned to the flow are decremented, before new state is assigned (and the counters, which may not belong to the same host anymore, are incremented again). Back when this code was introduced, the host fairness mode was always enabled, so the decrement was unconditional. When the configuration flags were introduced the *increment* was made conditional, but the *decrement* was not. Which of course can lead to a spurious decrement (and associated wrap-around to U16_MAX). AFAICT, when host fairness is disabled, the decrement and wrap-around happens as soon as a hash collision occurs (which is not that common in itself, due to the set-associative hashing). However, in most cases this is harmless, as the value is only used when host fairness mode is enabled. So in order to trigger an array overflow, sch_cake has to first be configured with host fairness disabled, and while running in this mode, a hash collision has to occur to cause the overflow. Then, the qdisc has to be reconfigured to enable host fairness, which leads to the array out-of-bounds because the wrapped-around value is retained and used as an array index. It seems that syzbot managed to trigger this, which is quite impressive in its own right. This patch fixes the issue by introducing the same conditional check on decrement as is used on increment. The original bug predates the upstreaming of cake, but the commit listed in the Fixes tag touched that code, meaning that this patch won't apply before that.

View original source

05 / REFERENCES

Further evidence