CVE-2025-21647: sched: sch_cake: add bounds checks to host bulk flow fairness counts
In the Linux kernel, the following vulnerability has been resolved:
sched: schcake: add bounds checks to host bulk flow fairness counts
Even though we fixed a logic error in the commit cited below, syzbot still managed to trigger an underflow of the per-host bulk flow counters, leading to an out of bounds memory access.
To avoid any such logic errors causing out of bounds memory accesses, this commit factors out all accesses to the per-host bulk flow counters to a series of helpers that perform bounds-checking before any increments and decrements. This also has the benefit of improving readability by moving the conditional checks for the flow mode into these helpers, instead of having them spread out throughout the code (which was the cause of the original logic error).
As part of this change, the flow quantum calculation is consolidated into a helper function, which means that the dithering applied to the ost load scaling is now applied both in the DRR rotation and when a sparse flow's quantum is first initiated. The only user-visible effect of this is that the maximum packet size that can be sent while a flow stays sparse will now vary with +/- one byte in some cases. This should not make a noticeable difference in practice, and thus it's not worth complicating the code to preserve the old behaviour.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21647?
CVE-2025-21647 has been classified as a medium severity vulnerability due to its potential impact on performance and stability in the Linux kernel.
How do I fix CVE-2025-21647?
To fix CVE-2025-21647, users should update to the latest version of the Linux kernel where the vulnerability has been resolved.
What components are affected by CVE-2025-21647?
CVE-2025-21647 affects the scheduling component of the Linux kernel, particularly the sch_cake module.
Can CVE-2025-21647 lead to a denial of service?
Yes, CVE-2025-21647 could potentially lead to a denial of service if the vulnerability is exploited to disrupt the host's flow management.
Is CVE-2025-21647 considered a logic error?
Yes, CVE-2025-21647 originated from a logic error related to bounds checks in the host's bulk flow fairness counts.