VDB

CVE-2024-26885

CVE-2024-26885 PUBLISHED CVSS 7.8 HIGH

bpf: Fix DEVMAP_HASH overflow check on 32-bit arches

Reported by linux · Published April 17, 2024

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
linux_kernellinux6.8.2, 6.7.11, 6.6.23, 6.1.83, 5.15.153, 5.10.214
SIMATIC S7-1500 TM MFP - GNU/Linux subsystemSiemens1.1.1

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux6f9d451ab1a33728adb72d7ff66a7b374d665176, 6f9d451ab1a33728adb72d7ff66a7b374d665176, 6f9d451ab1a33728adb72d7ff66a7b374d665176
LinuxLinux5.4, 0, 5.4.285
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystem0
linuxlinux_kernel5.4, 5.4, 5.4
LinuxLinux6.1.83, 6.8.2, 6.9
linuxlinux_kernel5.4, 6f9d451ab1a3

Timeline

  • Apr 17, 2024 CVE Published
  • Apr 18, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 4, 2024 Coalition ESS Score (16 in total, the first dated here)
  • Jan 15, 2026 Security Advisory (260 in total, the first dated here)
  • Mar 30, 2026 Distribution Patch (203 in total, the first dated here)
  • Oct 15, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-26885
vulnetix vdb fixes CVE-2024-26885

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-26885/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›