Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix stackmap overflow check on 32-bit arches
The stackmap code relies on roundup_pow_of_two() to compute the number of hash buckets, and contains an overflow check by checking if the resulting value is 0. However, on 32-bit arches, the roundup code itself can overflow by doing a 32-bit left-shift of an unsigned long value, which is undefined behaviour, so it is not guaranteed to truncate neatly. This was triggered by syzbot on the DEVMAP_HASH type, which contains the same check, copied from the hashtab code.
The commit in the fixes tag actually attempted to fix this, but the fix did not account for the UB, so the fix only works on CPUs where an overflow does result in a neat truncation to zero, which is not guaranteed. Checking the value before rounding does not have this problem.
Details
- Affected product:
- AlmaLinux 9.2 ESU , CentOS 6 ELS , CentOS 7 ELS , CentOS 8.4 ELS , CentOS 8.5 ELS , CentOS Stream 8 ELS , CloudLinux 6 ELS , CloudLinux 7 ELS , Oracle Linux 6 ELS , Oracle Linux 7 ELS , TuxCare 9.6 ESU , Ubuntu 16.04 ELS , Ubuntu 18.04 ELS
- Affected packages:
- kernel @ 2.6.32 (+13 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| Amazon Linux 2023 | Planned | — |
| Debian 10 | Will Not Fix | — |
| Debian 10 cloud | Will Not Fix | — |
| Debian 11 | Released |
28 kernels
|
| Debian 11 cloud | Released |
8 kernels
|
| Debian 12 | Planned | — |
| Proxmox VE 7 5.15 | Released |
44 kernels
|
| Ubuntu 18.04 AWS Focal | Released |
42 kernels
|
| Ubuntu 18.04 Azure Focal | Released |
42 kernels
|
| Ubuntu 18.04 HWE Focal | Released |
46 kernels
|
| Ubuntu 18.04 HWE GCP | Released |
1 kernel
|
| Ubuntu 20.04 | Released |
72 kernels
|
| Ubuntu 20.04 AWS | Released |
67 kernels
|
| Ubuntu 20.04 Azure | Released |
64 kernels
|
| Ubuntu 20.04 GCP | Released |
16 kernels
|
| Ubuntu 20.04 HWE AWS | Released |
39 kernels
|
| Ubuntu 20.04 HWE Azure | Released |
23 kernels
|
| Ubuntu 22.04 | Released |
52 kernels
|
| Ubuntu 22.04 AWS | Released |
46 kernels
|
| Ubuntu 22.04 Azure | Released |
43 kernels
|
| Ubuntu 24.04 | Released |
1 kernel
|