CVE-2024-35905·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: bpf: Protect against int overflow for stack access size This patch re-introduces protection against the size of access to stack memory being negative; the access size can appear negative as a result of overflowing its signed int representation. This should not actually happen, as there are other protections along the way, but we should protect against it anyway. One code path was missing such protections (fixed in the previous patch in the series), causing out-of-bounds array accesses in check_stack_range_initialized(). This patch causes the verification of a program with such a non-sensical access size to fail. This check used to exist in a more indirect way, but was inadvertendly removed in a833a17aeac7.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.8.5
- Published
- 2024-05-19
Affected versions
From: 6.7.2
Until: 6.8.5
Fixed in: 6.8.5
How to fix this CVE
Update your Linux kernel to version 6.8.5 or later to patch the integer overflow vulnerability in BPF stack access validation. This issue allows malicious eBPF programs to trigger out-of-bounds memory access during kernel verification, potentially leading to privilege escalation or denial of service. Affected systems running kernel versions 6.7.2 through 6.8.4 should prioritize this update to restore proper bounds checking in the BPF verifier.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version with: uname -r | awk -F. '{print $1"."$2"."$3}'
- Verify if you fall within the vulnerable range (6.7.2 to 6.8.4): if your version output is between these numbers, your system is vulnerable
- Check if BPF programs are loaded on your system with: bpftool prog list (requires bpftool package installed)
- After applying the update, reboot and verify the new kernel version with: uname -r
FAQ
What is CVE-2024-35905?
This vulnerability is an integer overflow bug in the Linux kernel's eBPF verifier that fails to properly validate stack access sizes, allowing signed integer overflow to produce negative values that bypass bounds checks and cause out-of-bounds array accesses.
Is CVE-2024-35905 being actively exploited?
No, there is no evidence of active exploitation in the wild and no public exploit code is available. However, this is a kernel-level vulnerability that could be leveraged by local attackers with eBPF privileges.
What versions of Kernel are affected by CVE-2024-35905?
Linux kernel versions 6.7.2 through 6.8.4 are vulnerable. The fix is included in kernel 6.8.5 and later.
How do I check if my server is vulnerable to CVE-2024-35905?
Run 'uname -r' to get your kernel version. If it shows a version between 6.7.2 and 6.8.4, your system is vulnerable and requires an immediate kernel update and reboot.
Does Defensia detect CVE-2024-35905?
Yes — Defensia's CVE advisory scanner compares installed kernel package versions against the NVD database. If a vulnerable kernel is detected on a monitored server, CVE-2024-35905 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/203a68151e8eeb331d4a64ab78303f3a15faf103
- https://git.kernel.org/stable/c/37dc1718dc0c4392dbfcb9adec22a776e745dd69
- https://git.kernel.org/stable/c/3f0784b2f1eb9147973d8c43ba085c5fdf44ff69
- https://git.kernel.org/stable/c/98cdac206b112bec63852e94802791e316acc2c1
- https://git.kernel.org/stable/c/9970e059af471478455f9534e8c3db82f8c5496d
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-35905. Free for 1 server.
Get started free