CVE-2024-42072·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix may_goto with negative offset. Zac's syzbot crafted a bpf prog that exposed two bugs in may_goto. The 1st bug is the way may_goto is patched. When offset is negative it should be patched differently. The 2nd bug is in the verifier: when current state may_goto_depth is equal to visited state may_goto_depth it means there is an actual infinite loop. It's not correct to prune exploration of the program at this point. Note, that this check doesn't limit the program to only one may_goto insn, since 2nd and any further may_goto will increment may_goto_depth only in the queued state pushed for future exploration. The current state will have may_goto_depth == 0 regardless of number of may_goto insns and the verifier has to explore the program until bpf_exit.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.9.8
- Published
- 2024-07-29
Affected versions
From: 6.9
Until: 6.9.8
Fixed in: 6.9.8
How to fix this CVE
Update your Linux kernel to version 6.9.8 or later to resolve two critical eBPF verifier bugs that could lead to kernel privilege escalation. The vulnerabilities affect how the may_goto instruction is patched with negative offsets and how the verifier handles infinite loop detection in eBPF programs. Systems running kernel versions 6.9 through 6.9.7 should prioritize this update immediately.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with `uname -r` and compare it against the affected range 6.9.0 to 6.9.7
- Step 2: Verify eBPF is enabled by checking `cat /boot/config-$(uname -r) | grep CONFIG_BPF` — if it returns 'CONFIG_BPF=y', the kernel has eBPF support
- Step 3: Search kernel logs with `dmesg | grep -i 'may_goto\|bpf.*verifier'` to identify any recent eBPF verification failures or anomalies
- Step 4: After updating, confirm the new kernel version with `uname -r` and reboot if necessary with `sudo systemctl reboot`
FAQ
What is CVE-2024-42072?
This vulnerability contains two distinct eBPF verifier bugs: improper patching of may_goto instructions with negative offsets, and incorrect infinite loop detection that fails to prune malicious program states. An attacker with eBPF loading capability could craft a malicious program to bypass verification checks and achieve kernel privilege escalation.
Is CVE-2024-42072 being actively exploited?
No, this CVE is not listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available, though the vulnerability was discovered through adversarial fuzzing.
What versions of Kernel are affected by CVE-2024-42072?
Linux kernel versions 6.9.0 through 6.9.7 are vulnerable. The fix is included in kernel 6.9.8 and later.
How do I check if my server is vulnerable to CVE-2024-42072?
Run `uname -r` to display your kernel version. If the output shows 6.9.x where x is less than 8, your system is vulnerable. Additionally confirm eBPF is enabled with `cat /boot/config-$(uname -r) | grep CONFIG_BPF`.
Does Defensia detect CVE-2024-42072?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server running versions 6.9.0 through 6.9.7, CVE-2024-42072 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-42072. Free for 1 server.
Get started free