Description
In the Linux kernel, the following vulnerability has been resolved:
sched/fair: Fix shift-out-of-bounds in load_balance()
Syzbot reported a handful of occurrences where an sd->nr_balance_failed can
grow to much higher values than one would expect.
A successful load_balance() resets it to 0; a failed one increments
it. Once it gets to sd->cache_nice_tries + 3, this *should* trigger an
active balance, which will either set it to sd->cache_nice_tries+1 or reset
it to 0. However, in case the to-be-active-balanced task is not allowed to
run on env->dst_cpu, then the increment is done without any further
modification.
This could then be repeated ad nauseam, and would explain the absurdly high
values reported by syzbot (86, 149). VincentG noted there is value in
letting sd->cache_nice_tries grow, so the shift itself should be
fixed. That means preventing:
"""
If the value of the right operand is negative or is greater than or equal
to the width of the promoted left operand, the behavior is undefined.
"""
Thus we need to cap the shift exponent to
BITS_PER_TYPE(typeof(lefthand)) - 1.
I had a look around for other similar cases via coccinelle:
@expr@
position pos;
expression E1;
expression E2;
@@
(
E1 >> E2@pos
|
E1 >> E2@pos
)
@cst depends on expr@
position pos;
expression expr.E1;
constant cst;
@@
(
E1 >> cst@pos
|
E1 << cst@pos
)
@script:python depends on !cst@
pos << expr.pos;
exp << expr.E2;
@@
# Dirty hack to ignore constexpr
if exp.upper() != exp:
coccilib.report.print_report(pos[0], "Possible UB shift here")
The only other match in kernel/sched is rq_clock_thermal() which employs
sched_thermal_decay_shift, and that exponent is already capped to 10, so
that one is fine.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.10 | 5.10.37 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 5.10.38-1 | — |
| Debian 13 | linux | 5.10.38-1 | — |
| Debian 12 | linux | 5.10.38-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | linux-riscv +19 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP3 | kernel-64kb +7 | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLES 15 SP3 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP3 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SLES for SAP 15 SP3 | kernel-docs +5 | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.2 | kernel-default | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.2 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.2 | kernel-rt +1 | 5.3.18-150300.166.1 | SUSE-SU-2024:1465-1 |
| SLE Micro 5.1 | kernel-default | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.1 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.1 | kernel-rt +1 | 5.3.18-150300.166.1 | SUSE-SU-2024:1465-1 |
| SLE Live Patching 15 SP3 | kernel-default | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_43 | 1-150300.7.3.5 | SUSE-SU-2024:1489-1 |
| SLE HPC 15 SP3 | kernel-64kb +6 | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE HPC 15 SP3 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SUSE Enterprise Storage 7.1 | kernel-64kb +6 | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE Enterprise Storage 7.1 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
Advisories 3
- SUSE-SU-2024:1489-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1465-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2024-0499 Linux Kernel: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff BSI CERT-Bund (WID) · Oct 12, 2025