Skip to content

CVE-2025-21647 sched: sch_cake: add bounds checks to host bulk flow fairness counts

HighCVSS 7.1 EPSS 0.32%
Published
Updated
Exploit status
No public exploit known
Technology
Linux KernelUbuntuDebian

Description

In the Linux kernel, the following vulnerability has been resolved:

sched: sch_cake: 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.

Upgrade path

11 packages: 9 fixed, 2 with no fix yet.

PackageAffectedFixed inStatus
Siemens SIMATIC S7-1500 TM MFP - BIOS All versions No fix listed No fix yet
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem All versions No fix listed No fix yet
debian/linux(Debian 12) < 6.1.128-1; = 6.1.27-1; = 6.1.37-1; = 6.1.38-1 +31 more 6.1.128-1 Fixed
debian/linux(Debian 13) < 6.12.10-1 6.12.10-1 Fixed
debian/linux(Debian 14) < 6.12.10-1 6.12.10-1 Fixed
Linux kernel < 5.4.291; < 5.10.235; < 5.15.179; < 6.1.125 +26 more 5.4.291, 5.10.235, 5.15.179, 6.1.125, 6.6.72, 6.11, 6.12.10, 6.13, 44fe1efb4961c1a5ccab16bb579dfc6b308ad58b, 91bb18950b88f955838ec0c1d97f74d135756dc7, 737d4d91d35b5f7fa5bb442651472277318b0bfd, 27202e2e8721c3b23831563c36ed5ac7818641ba, a777e06dfc72bed73c05dcb437d7c27ad5f90f3f, b1a1743aaa4906c41c426eda97e2e2586f79246d, bb0245fa72b783cb23a9949c5048781341e91423 Fixed
ubuntu/linux(Ubuntu 22.04) < 5.15.0-140.150 5.15.0-140.150 Fixed
ubuntu/linux(Ubuntu 24.04) < 6.8.0-60.63 6.8.0-60.63 Fixed
ubuntu/linux-kvm(Ubuntu 22.04) < 5.15.0-1080.85 5.15.0-1080.85 Fixed
ubuntu/linux-raspi(Ubuntu 22.04) < 5.15.0-1078.81 5.15.0-1078.81 Fixed
ubuntu/linux-raspi(Ubuntu 24.04) < 6.8.0-1028.32 6.8.0-1028.32 Fixed

Affected products

ProductAffected versionsFixed in
debian/linux(Debian:12) < 6.1.128-1 6.1.128-1
debian/linux(Debian:12) = 6.1.106-1 No fix listed
debian/linux(Debian:12) = 6.1.106-2 No fix listed
debian/linux(Debian:12) = 6.1.106-3 No fix listed
debian/linux(Debian:12) = 6.1.112-1 No fix listed
debian/linux(Debian:12) = 6.1.115-1 No fix listed
debian/linux(Debian:12) = 6.1.119-1 No fix listed
debian/linux(Debian:12) = 6.1.123-1 No fix listed
debian/linux(Debian:12) = 6.1.124-1 No fix listed
debian/linux(Debian:12) = 6.1.27-1 No fix listed
debian/linux(Debian:12) = 6.1.37-1 No fix listed
debian/linux(Debian:12) = 6.1.38-1 No fix listed
debian/linux(Debian:12) = 6.1.38-2 No fix listed
debian/linux(Debian:12) = 6.1.38-2~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.38-3 No fix listed
debian/linux(Debian:12) = 6.1.38-4 No fix listed
debian/linux(Debian:12) = 6.1.38-4~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.52-1 No fix listed
debian/linux(Debian:12) = 6.1.55-1 No fix listed
debian/linux(Debian:12) = 6.1.55-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.64-1 No fix listed
debian/linux(Debian:12) = 6.1.66-1 No fix listed
debian/linux(Debian:12) = 6.1.67-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1~bpo11+1 No fix listed
Show 49 more
ProductAffected versionsFixed in
debian/linux(Debian:12) = 6.1.76-1 No fix listed
debian/linux(Debian:12) = 6.1.76-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.82-1 No fix listed
debian/linux(Debian:12) = 6.1.85-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.94-1 No fix listed
debian/linux(Debian:12) = 6.1.94-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.98-1 No fix listed
debian/linux(Debian:12) = 6.1.99-1 No fix listed
debian/linux(Debian:13) < 6.12.10-1 6.12.10-1
debian/linux(Debian:14) < 6.12.10-1 6.12.10-1
Linux kernel >= 4a4eeefa514db570be025ab46d779af180e2c9bb, < 44fe1efb4961c1a5ccab16bb579dfc6b308ad58b 44fe1efb4961c1a5ccab16bb579dfc6b308ad58b
Linux kernel >= 7725152b54d295b7da5e34c2f419539b30d017bd, < b1a1743aaa4906c41c426eda97e2e2586f79246d b1a1743aaa4906c41c426eda97e2e2586f79246d
Linux kernel >= cde71a5677971f4f1b69b25e854891dbe78066a4, < bb0245fa72b783cb23a9949c5048781341e91423 bb0245fa72b783cb23a9949c5048781341e91423
Linux kernel >= 549e407569e08459d16122341d332cb508024094, < a777e06dfc72bed73c05dcb437d7c27ad5f90f3f a777e06dfc72bed73c05dcb437d7c27ad5f90f3f
Linux kernel >= d4a9039a7b3d8005b90c7b1a55a306444f0e5447, < 27202e2e8721c3b23831563c36ed5ac7818641ba 27202e2e8721c3b23831563c36ed5ac7818641ba
Linux kernel >= 546ea84d07e3e324644025e2aae2d12ea4c5896e, < 91bb18950b88f955838ec0c1d97f74d135756dc7 91bb18950b88f955838ec0c1d97f74d135756dc7
Linux kernel >= 546ea84d07e3e324644025e2aae2d12ea4c5896e, < 737d4d91d35b5f7fa5bb442651472277318b0bfd 737d4d91d35b5f7fa5bb442651472277318b0bfd
Linux kernel = d7c01c0714c04431b5e18cf17a9ea68a553d1c3c No fix listed
Linux kernel >= 5.4.284, < 5.4.291 5.4.291
Linux kernel >= 5.10.226, < 5.10.235 5.10.235
Linux kernel >= 5.15.167, < 5.15.179 5.15.179
Linux kernel >= 6.1.110, < 6.1.125 6.1.125
Linux kernel >= 6.6.51, < 6.6.72 6.6.72
Linux kernel >= 6.10.10, < 6.11 6.11
Linux kernel = 6.11 No fix listed
Linux kernel < 5.4.291 5.4.291
Linux kernel < 5.10.235 5.10.235
Linux kernel < 5.15.179 5.15.179
Linux kernel < 6.1.125 6.1.125
Linux kernel < 6.6.72 6.6.72
Linux kernel < 6.12.10 6.12.10
Linux kernel < 6.13 6.13
Siemens SIMATIC S7-1500 TM MFP - BIOS All versions No fix listed
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem All versions No fix listed
ubuntu/linux(Ubuntu:22.04) < 5.15.0-140.150 5.15.0-140.150
ubuntu/linux-kvm(Ubuntu:22.04) < 5.15.0-1080.85 5.15.0-1080.85
ubuntu/linux-raspi(Ubuntu:22.04) < 5.15.0-1078.81 5.15.0-1078.81
ubuntu/linux(Ubuntu:24.04) < 6.8.0-60.63 6.8.0-60.63
ubuntu/linux-raspi(Ubuntu:24.04) < 6.8.0-1028.32 6.8.0-1028.32
Linux kernel >= 6.11.1, < 6.12.10 6.12.10
Linux kernel = 6.11-rc7 No fix listed
Linux kernel = 6.13-rc1 No fix listed
Linux kernel = 6.13-rc2 No fix listed
Linux kernel = 6.13-rc3 No fix listed
Linux kernel = 6.13-rc4 No fix listed
Linux kernel = 6.13-rc5 No fix listed
Linux kernel = 6.13-rc6 No fix listed

References