CVE-2024-26885

bpf: Fix DEVMAP_HASH overflow check on 32-bit arches

7.8 high EPSS 0.25%

Published 17 Apr 2024 Updated 15 Oct 2026 CNA: Linux

Check your servers for CVE-2024-26885

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-26885 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

7.8 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 17.5% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 28 May 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 6f9d451ab1a33728adb72d7ff66a7b374d665176, before 1f5e352b9088211fa5eb4e1639cd365f4f7d2f65
affected from 6f9d451ab1a33728adb72d7ff66a7b374d665176, before 4b81a9f92b3676cb74b907a7a209b3d15bd9a7f9
affected from 6f9d451ab1a33728adb72d7ff66a7b374d665176, before c826502bed93970f2fd488918a7b8d5f1d30e2e3
affected from 6f9d451ab1a33728adb72d7ff66a7b374d665176, before edf7990baa48de5097daa9ac02e06cb4c798a737
affected from 6f9d451ab1a33728adb72d7ff66a7b374d665176, before 250051acc21f9d4c5c595e4fcb55986ea08c4691
affected from 6f9d451ab1a33728adb72d7ff66a7b374d665176, before 22079b3a423382335f47d9ed32114e6c9fe88d7c
affected from 6f9d451ab1a33728adb72d7ff66a7b374d665176, before e89386f62ce9a9ab9a94835a9890883c23d9d52c
affected from 6f9d451ab1a33728adb72d7ff66a7b374d665176, before 281d464a34f540de166cee74b723e97ac2515ec3
Other versions: unaffected
Linux
affected 5.4
unaffected before 5.4
unaffected from 5.4.285 up to and including 5.4.*
unaffected from 5.10.227 up to and including 5.10.*
unaffected from 5.15.153 up to and including 5.15.*
unaffected from 6.1.83 up to and including 6.1.*
unaffected from 6.6.23 up to and including 6.6.*
unaffected from 6.7.11 up to and including 6.7.*
unaffected from 6.8.2 up to and including 6.8.*
unaffected 6.9 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-26885 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-26885

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-26885
trivy image --scanners vuln IMAGE | grep CVE-2024-26885

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-26885 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.