CVE-2024-46828
Last modified
CVE-2024-46828 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. 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. EPSS estimates a 0.25% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Linux | Linux Kernel | >= 5.1, < 5.4.284 | — |
| Linux | Linux Kernel | >= 5.10, < 5.10.226 | — |
| Linux | Linux Kernel | >= 5.15, < 5.15.167 | — |
| Linux | Linux Kernel | >= 6.1, < 6.1.110 | — |
| Linux | Linux Kernel | >= 6.6, < 6.6.51 | — |
| Linux | Linux Kernel | >= 6.10, < 6.10.10 | — |
| Linux | Linux Kernel | 6.11 | Rc1 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2024-46828?
How severe is CVE-2024-46828?
How do I fix CVE-2024-46828?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2024
- CVE-2024-46822In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-46823In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-46824In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-46825In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-46826In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-46827In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-46829In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-4683A vulnerability was found in Campcodes Complete Web-Based Sc…6.1
- CVE-2024-46830In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2024-46831In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2024-46832In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-46833In the Linux kernel, the following vulnerability has been re…7.8
Are you affected by CVE-2024-46828?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
