Vulnerability · Published Apr 17, 2024 · Assigned by Linux
CVE-2024-26885bpf: Fix DEVMAP_HASH overflow check on 32-bit arches
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix DEVMAP_HASH overflow check on 32-bit arches The devmap code allocates a number hash buckets equal to the next power of two of the max_entries value provided when creating the map. When rounding up to the next power of two, the 32-bit variable storing the number of buckets can overflow, and the code checks for overflow by checking if the truncated 32-bit value is equal to 0. However, on 32-bit arches the rounding up itself can overflow mid-way through, because it ends up doing a left-shift of 32 bits on an unsigned long value. If the size of an unsigned long is four bytes, this is undefined behaviour, so there is no guarantee that we'll end up with a nice and tidy 0-value at the end. Syzbot managed to turn this into a crash on arm32 by creating a DEVMAP_HASH with max_entries > 0x80000000 and then trying to update it. Fix this by moving the overflow check to before the rounding up operation.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.85-1 | DEBIAN-CVE-2024-26885 |
| Debian:13 | linux | 6.7.12-1 | DEBIAN-CVE-2024-26885 |
| Debian:14 | linux | 6.7.12-1 | DEBIAN-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux | 5.15.0-112.122 | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux | 6.8.0-35.35 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1063.69 | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1009.9 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1066.75 | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1008.8 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1067.76.1 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1062.70 | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1008.9 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1060.66 | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1004.7 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1046.53 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1056.59 | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1006.6 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1058.64 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1060.65 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-110.120 | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-35.35.1 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1058.59 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1026.26 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1015.15 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1006.6 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1061.67 | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1006.6 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1058.61 | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1005.5 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-35.35.1 | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-26885 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1030.34 | UBUNTU-CVE-2024-26885 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 6f9d451ab1a33728adb72d7ff66a7b374d665176 – before 1f5e352b9088211fa5eb4e1639cd365f4f7d2f656f9d451ab1a33728adb72d7ff66a7b374d665176 – before 4b81a9f92b3676cb74b907a7a209b3d15bd9a7f96f9d451ab1a33728adb72d7ff66a7b374d665176 – before c826502bed93970f2fd488918a7b8d5f1d30e2e36f9d451ab1a33728adb72d7ff66a7b374d665176 – before edf7990baa48de5097daa9ac02e06cb4c798a7376f9d451ab1a33728adb72d7ff66a7b374d665176 – before 250051acc21f9d4c5c595e4fcb55986ea08c46916f9d451ab1a33728adb72d7ff66a7b374d665176 – before 22079b3a423382335f47d9ed32114e6c9fe88d7c6f9d451ab1a33728adb72d7ff66a7b374d665176 – before e89386f62ce9a9ab9a94835a9890883c23d9d52c6f9d451ab1a33728adb72d7ff66a7b374d665176 – before 281d464a34f540de166cee74b723e97ac2515ec3 |
| Linux | Linux | 5.4 |
References
- https://git.kernel.org/stable/c/1f5e352b9088211fa5eb4e1639cd365f4f7d2f65
- https://git.kernel.org/stable/c/4b81a9f92b3676cb74b907a7a209b3d15bd9a7f9
- https://git.kernel.org/stable/c/c826502bed93970f2fd488918a7b8d5f1d30e2e3
- https://git.kernel.org/stable/c/edf7990baa48de5097daa9ac02e06cb4c798a737
- https://git.kernel.org/stable/c/250051acc21f9d4c5c595e4fcb55986ea08c4691
- https://git.kernel.org/stable/c/22079b3a423382335f47d9ed32114e6c9fe88d7c
- https://git.kernel.org/stable/c/e89386f62ce9a9ab9a94835a9890883c23d9d52c
- https://git.kernel.org/stable/c/281d464a34f540de166cee74b723e97ac2515ec3
- https://git.kernel.org/stable/c/225da02acdc97af01b6bc6ce1a3e5362bf01d3fb x_transferred
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html x_transferred
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html