CVE-2024-38574·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: libbpf: Prevent null-pointer dereference when prog to load has no BTF In bpf_objec_load_prog(), there's no guarantee that obj->btf is non-NULL when passing it to btf__fd(), and this function does not perform any check before dereferencing its argument (as bpf_object__btf_fd() used to do). As a consequence, we get segmentation fault errors in bpftool (for example) when trying to load programs that come without BTF information. v2: Keep btf__fd() in the fix instead of reverting to bpf_object__btf_fd().
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.9.3
- Published
- 2024-06-19
Affected versions
From: 6.9
Until: 6.9.3
Fixed in: 6.9.3
How to fix this CVE
Update your Linux kernel to version 6.9.3 or later to resolve this null-pointer dereference vulnerability in libbpf. Systems running kernel versions 6.9 through 6.9.2 should prioritize this update to prevent segmentation faults when loading eBPF programs without BTF metadata. Apply the kernel update and reboot your system to ensure the fix is active.
sudo dnf update kernel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r
- Verify if kernel versions 6.9.0, 6.9.1, or 6.9.2 are installed: dpkg -l | grep linux-image (Debian/Ubuntu) or rpm -qa | grep kernel (RHEL/CentOS)
- Search system logs for segmentation faults related to bpftool or eBPF program loading: grep -i 'segmentation fault\|bpf' /var/log/kern.log /var/log/messages
- After patching, confirm the new kernel version is running: uname -r (should be 6.9.3 or higher)
FAQ
What is CVE-2024-38574?
This vulnerability is a null-pointer dereference bug in the Linux kernel's libbpf library that occurs when attempting to load eBPF programs without BTF (BPF Type Format) metadata. The btf__fd() function fails to validate that the BTF pointer is non-null before dereferencing it, resulting in segmentation faults.
Is CVE-2024-38574 being actively exploited?
No, CVE-2024-38574 is not being actively exploited and there are no public exploits available. This is primarily a denial-of-service vulnerability affecting eBPF program loading operations.
What versions of Kernel are affected by CVE-2024-38574?
Linux kernel versions 6.9, 6.9.1, and 6.9.2 are affected. Version 6.9.3 and later include the fix.
How do I check if my server is vulnerable to CVE-2024-38574?
Run 'uname -r' to check your kernel version. If the output shows 6.9.0, 6.9.1, or 6.9.2, your system is vulnerable. Versions 6.9.3 and above are patched.
Does Defensia detect CVE-2024-38574?
Yes — Defensia's CVE advisory scanner compares installed kernel versions against the NVD database. If a vulnerable kernel version is detected on a monitored server, CVE-2024-38574 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1fd91360a75833b7110af9834ae26c977e1273e0
- https://git.kernel.org/stable/c/9bf48fa19a4b1d186e08b20bf7e5de26a15644fb
- https://git.kernel.org/stable/c/ef80b59acfa4dee4b5eaccb15572b69248831104
- https://git.kernel.org/stable/c/1fd91360a75833b7110af9834ae26c977e1273e0
- https://git.kernel.org/stable/c/9bf48fa19a4b1d186e08b20bf7e5de26a15644fb
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-38574. Free for 1 server.
Get started free