CVE-2024-50262·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix out-of-bounds write in trie_get_next_key() trie_get_next_key() allocates a node stack with size trie->max_prefixlen, while it writes (trie->max_prefixlen + 1) nodes to the stack when it has full paths from the root to leaves. For example, consider a trie with max_prefixlen is 8, and the nodes with key 0x00/0, 0x00/1, 0x00/2, ... 0x00/8 inserted. Subsequent calls to trie_get_next_key with _key with .prefixlen = 8 make 9 nodes be written on the node stack with size 8.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.11.7
- Published
- 2024-11-09
Affected versions
From: 6.7
Until: 6.11.7
Fixed in: 6.11.7
How to fix this CVE
Update your Linux kernel to version 6.11.7 or later to patch the out-of-bounds write vulnerability in the eBPF trie implementation. This vulnerability allows local privileged users to corrupt kernel memory by exploiting improper stack allocation in the trie_get_next_key() function. Immediate patching is recommended for systems with kernel versions 6.7 through 6.11.6 that run eBPF-based applications or have unprivileged eBPF enabled.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your kernel version: uname -r — if it shows 6.7.x through 6.11.6, you are vulnerable
- Verify eBPF is enabled: cat /boot/config-$(uname -r) | grep CONFIG_BPF — if set to 'y', the vulnerable code path is compiled
- Check for eBPF program activity: bpftool prog list — if trie-based eBPF programs are loaded, exploitation surface exists
- After patching, confirm: uname -r should show 6.11.7 or later, and verify no memory corruption errors in dmesg during eBPF operations
FAQ
What is CVE-2024-50262?
CVE-2024-50262 is a kernel memory corruption vulnerability in Linux's eBPF trie data structure implementation. The trie_get_next_key() function allocates insufficient stack space, causing it to write one additional node beyond the allocated buffer when traversing full-depth trie paths, leading to kernel memory corruption.
Is CVE-2024-50262 being actively exploited?
No. This vulnerability is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, and no public exploits are currently available. However, it requires local access with elevated privileges to trigger.
What versions of Kernel are affected by CVE-2024-50262?
Linux kernel versions 6.7 through 6.11.6 are vulnerable. The fix is included in kernel 6.11.7 and later stable releases.
How do I check if my server is vulnerable to CVE-2024-50262?
Run 'uname -r' and check if your kernel version falls between 6.7 and 6.11.6. Also verify eBPF is enabled with 'cat /boot/config-$(uname -r) | grep CONFIG_BPF' — if it returns 'CONFIG_BPF=y', your system is vulnerable.
Does Defensia detect CVE-2024-50262?
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-50262 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21
- https://git.kernel.org/stable/c/590976f921723d53ac199c01d5b7b73a94875e68
- https://git.kernel.org/stable/c/86c8ebe02d8806dd8878d0063e8e185622ab6ea6
- https://git.kernel.org/stable/c/90a6e0e1e151ef7a9282e78f54c3091de2dcc99c
- https://git.kernel.org/stable/c/91afbc0eb3c90258ae378ae3c6ead3d2371e926d
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-50262. Free for 1 server.
Get started free