CVE-2024-26885·Kernel vulnerability
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
- high
- Software
- Kernel
- Fixed in
- 6.8.2
- Published
- 2024-04-17
Affected versions
From: 6.8
Until: 6.8.2
Fixed in: 6.8.2
How to fix this CVE
Update your Linux kernel to version 6.8.2 or later to patch a critical integer overflow vulnerability in the BPF DEVMAP_HASH implementation. This flaw affects 32-bit architectures and can be triggered by unprivileged users creating specially-crafted BPF maps with excessive max_entries values. Apply the kernel update as soon as possible, particularly on systems running kernel versions 6.8 through 6.8.1.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r — confirm if version is between 6.8 and 6.8.1
- Verify BPF capability: grep -i bpf /boot/config-$(uname -r) — check if CONFIG_BPF_SYSCALL is enabled
- Check for BPF program loading in audit logs: sudo ausearch -m BPF 2>/dev/null | head -20
- Verify kernel patch level: cat /proc/version and cross-reference against kernel.org release notes for 6.8.2+ commit hashes
FAQ
What is CVE-2024-26885?
This CVE is an integer overflow vulnerability in the Linux kernel's BPF DEVMAP_HASH implementation that occurs during bucket allocation on 32-bit architectures. The flaw allows unprivileged users to trigger undefined behavior and potential system crashes by creating BPF maps with max_entries values exceeding 0x80000000.
Is CVE-2024-26885 being actively exploited?
No, CVE-2024-26885 is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploit code is available, though the vulnerability has been demonstrated to crash ARM32 systems via syzbot fuzzing.
What versions of Kernel are affected by CVE-2024-26885?
Linux kernel versions 6.8, 6.8.1, and 6.8.2-rc versions are affected. The vulnerability is patched in kernel 6.8.2 final release and later.
How do I check if my server is vulnerable to CVE-2024-26885?
Run uname -r and verify if your kernel version is 6.8.0 or 6.8.1. If it is, and BPF is enabled (CONFIG_BPF_SYSCALL=y in your kernel config), your system is vulnerable.
Does Defensia detect CVE-2024-26885?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-26885 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1f5e352b9088211fa5eb4e1639cd365f4f7d2f65
- https://git.kernel.org/stable/c/22079b3a423382335f47d9ed32114e6c9fe88d7c
- https://git.kernel.org/stable/c/250051acc21f9d4c5c595e4fcb55986ea08c4691
- https://git.kernel.org/stable/c/281d464a34f540de166cee74b723e97ac2515ec3
- https://git.kernel.org/stable/c/4b81a9f92b3676cb74b907a7a209b3d15bd9a7f9
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-26885. Free for 1 server.
Get started free