# CVE-2024-46828: sched: sch\_cake: fix bulk flow accounting logic for host fairness

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 18, 2026-11-26)
- **Published:** 2024-09-27T12:39:27.100Z
- **Modified:** 2026-08-05T11:38:51.366Z

## Who should check

- Anyone running Linux \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 4a4eeefa514db570be025ab46d779af180e2c9bb; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 7725152b54d295b7da5e34c2f419539b30d017bd; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< cde71a5677971f4f1b69b25e854891dbe78066a4; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 549e407569e08459d16122341d332cb508024094; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< d4a9039a7b3d8005b90c7b1a55a306444f0e5447; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< d7c01c0714c04431b5e18cf17a9ea68a553d1c3c; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 546ea84d07e3e324644025e2aae2d12ea4c5896e
- Anyone running Linux 5.1

## Description

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.

## Affected and fixed versions

- Linux: \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 4a4eeefa514db570be025ab46d779af180e2c9bb; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 7725152b54d295b7da5e34c2f419539b30d017bd; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< cde71a5677971f4f1b69b25e854891dbe78066a4; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 549e407569e08459d16122341d332cb508024094; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< d4a9039a7b3d8005b90c7b1a55a306444f0e5447; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< d7c01c0714c04431b5e18cf17a9ea68a553d1c3c; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 546ea84d07e3e324644025e2aae2d12ea4c5896e (cvelist)
- Linux: 5.1 (cvelist)

## Mitigation

- Upgrade Linux to 546ea84d07e3e324644025e2aae2d12ea4c5896e or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-46828. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-46828.md
Affected: Linux >= 712639929912c5eefb09facccb48d55b3f72c9f8, < 4a4eeefa514db570be025ab46d779af180e2c9bb; >= 712639929912c5eefb09facccb48d55b3f72c9f8, < 7725152b54d295b7da5e34c2f419539b30d017bd; >= 712639929912c5eefb09facccb48d55b3f72c9f8, < cde71a5677971f4f1b69b25e854891dbe78066a4; >= 712639929912c5eefb09fac…
Fixed in: Linux 4a4eeefa514db570be025ab46d779af180e2c9bb, Linux 7725152b54d295b7da5e34c2f419539b30d017bd, Linux 549e407569e08459d16122341d332cb508024094, Linux 546ea84d07e3e324644025e2aae2d12ea4c5896e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-46828 being exploited?

There is no confirmed exploitation: CVE-2024-46828 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-46828?

High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-46828?

Linux \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 4a4eeefa514db570be025ab46d779af180e2c9bb; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 7725152b54d295b7da5e34c2f419539b30d017bd; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< cde71a5677971f4f1b69b25e854891dbe78066a4; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 549e407569e08459d16122341d332cb508024094; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< d4a9039a7b3d8005b90c7b1a55a306444f0e5447; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< d7c01c0714c04431b5e18cf17a9ea68a553d1c3c; \>= 712639929912c5eefb09facccb48d55b3f72c9f8, \< 546ea84d07e3e324644025e2aae2d12ea4c5896e; Linux 5.1.

### Is there a fix for CVE-2024-46828?

Yes. Fixed in Linux 4a4eeefa514db570be025ab46d779af180e2c9bb, Linux 7725152b54d295b7da5e34c2f419539b30d017bd, Linux 549e407569e08459d16122341d332cb508024094, Linux 546ea84d07e3e324644025e2aae2d12ea4c5896e. Upgrade Linux to 546ea84d07e3e324644025e2aae2d12ea4c5896e or later.

### How do I check if I'm affected by CVE-2024-46828?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/4a4eeefa514db570be025ab46d779af180e2c9bb>
- patch: <https://git.kernel.org/stable/c/7725152b54d295b7da5e34c2f419539b30d017bd>
- patch: <https://git.kernel.org/stable/c/cde71a5677971f4f1b69b25e854891dbe78066a4>
- patch: <https://git.kernel.org/stable/c/549e407569e08459d16122341d332cb508024094>
- patch: <https://git.kernel.org/stable/c/d4a9039a7b3d8005b90c7b1a55a306444f0e5447>
- patch: <https://git.kernel.org/stable/c/d7c01c0714c04431b5e18cf17a9ea68a553d1c3c>
- patch: <https://git.kernel.org/stable/c/546ea84d07e3e324644025e2aae2d12ea4c5896e>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-46828>

HTML: <https://flawdb.com/CVE-2024-46828> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-46828>
