CVE-2024-26883·Kernel 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.
- 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 resolve a stack overflow vulnerability in the BPF stackmap implementation on 32-bit architectures. This vulnerability could allow a local privileged user to cause a denial of service or potentially corrupt kernel memory. Apply the kernel update through your distribution's package manager and reboot your system to complete the remediation.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r (vulnerable if output shows 6.8.0, 6.8.1, or 6.8.2 without patch)
- Verify BPF stackmap is compiled in: grep -i 'CONFIG_BPF_SYSCALL\|CONFIG_STACK_MAP' /boot/config-$(uname -r) (should show y if enabled)
- Monitor kernel logs for BPF-related crashes: dmesg | grep -i 'bpf\|stack\|overflow' (look for stack overflow or BPF errors)
- Confirm patch applied: uname -r should show kernel version 6.8.2 or later after reboot
FAQ
What is CVE-2024-26883?
This CVE addresses an arithmetic overflow vulnerability in the Linux kernel's BPF stackmap hash bucket calculation on 32-bit systems, where undefined behavior during a left-shift operation could bypass security checks designed to prevent memory allocation overflows.
Is CVE-2024-26883 being actively exploited?
No, there are no public exploits or active exploitations reported for this vulnerability according to CISA KEV data.
What versions of Kernel are affected by CVE-2024-26883?
Linux kernel versions 6.8.0 through 6.8.1 are vulnerable; the issue is patched in version 6.8.2 and later.
How do I check if my server is vulnerable to CVE-2024-26883?
Run 'uname -r' and check if your kernel version falls between 6.8.0 and 6.8.1, particularly on 32-bit architectures. If BPF stackmap is compiled in (check /boot/config-$(uname -r)), your system is vulnerable.
Does Defensia detect CVE-2024-26883?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Linux kernel is installed on a monitored server, CVE-2024-26883 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/0971126c8164abe2004b8536b49690a0d6005b0a
- https://git.kernel.org/stable/c/15641007df0f0d35fa28742b25c2a7db9dcd6895
- https://git.kernel.org/stable/c/21e5fa4688e1a4d3db6b72216231b24232f75c1d
- https://git.kernel.org/stable/c/43f798b9036491fb014b55dd61c4c5c3193267d0
- https://git.kernel.org/stable/c/7070b274c7866a4c5036f8d54fcaf315c64ac33a
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-26883. Free for 1 server.
Get started free