Skip to main content

CVE-2024-38662: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-38662cvecve-2024-38662
Published: Fri Jun 21 2024 (06/21/2024, 11:15:12 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Allow delete from sockmap/sockhash only if update is allowed We have seen an influx of syzkaller reports where a BPF program attached to a tracepoint triggers a locking rule violation by performing a map_delete on a sockmap/sockhash. We don't intend to support this artificial use scenario. Extend the existing verifier allowed-program-type check for updating sockmap/sockhash to also cover deleting from a map. From now on only BPF programs which were previously allowed to update sockmap/sockhash can delete from these map types.

AI-Powered Analysis

AILast updated: 06/28/2025, 03:56:44 UTC

Technical Analysis

CVE-2024-38662 is a vulnerability identified in the Linux kernel related to the Berkeley Packet Filter (BPF) subsystem, specifically concerning the handling of sockmap and sockhash map types. BPF is a powerful kernel technology that allows users to run sandboxed programs in the kernel space, commonly used for networking, tracing, and security monitoring. The vulnerability arises from an improper permission check in the BPF verifier logic that governs deletion operations on sockmap/sockhash maps. Prior to the fix, any BPF program attached to a tracepoint could perform a map_delete operation on these map types, even if it was not authorized to update them. This could lead to a locking rule violation, which is a concurrency control issue that may cause kernel instability or crashes. The patch enforces that only BPF programs previously allowed to update sockmap/sockhash maps can also delete entries from them, thereby closing this loophole. This restriction prevents unauthorized BPF programs from manipulating these maps in a way that could compromise kernel stability or security. The vulnerability was discovered through syzkaller fuzzing reports, indicating it was found during automated kernel testing rather than active exploitation in the wild. No known exploits have been reported so far. The affected versions include multiple recent Linux kernel commits prior to the patch date of June 21, 2024. Since BPF programs run with elevated privileges inside the kernel, improper handling of map operations can lead to denial of service or potentially escalate to privilege escalation if combined with other vulnerabilities. However, this specific issue mainly concerns kernel locking violations triggered by unauthorized map deletions.

Potential Impact

For European organizations, the impact of CVE-2024-38662 depends largely on their use of Linux systems that leverage BPF for networking, monitoring, or security purposes. Many enterprises, cloud providers, and telecom operators in Europe rely on Linux kernels with BPF for performance and observability enhancements. An attacker able to load unauthorized BPF programs that exploit this vulnerability could cause kernel crashes or denial of service, disrupting critical infrastructure or services. This could affect data centers, cloud platforms, and network equipment running vulnerable Linux kernels. Although no active exploits are known, the vulnerability could be leveraged in multi-stage attacks to destabilize systems or create conditions for privilege escalation. The impact on confidentiality is limited unless combined with other vulnerabilities, but integrity and availability could be significantly affected. Given the widespread use of Linux in European government, finance, and industrial sectors, unpatched systems could face operational disruptions. The vulnerability is particularly relevant for organizations running custom or third-party BPF programs, such as those using advanced network filtering or tracing tools. The risk is heightened in environments where untrusted users have the ability to load BPF programs or where containerized workloads share kernel resources.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2024-38662. Since the vulnerability involves kernel-level BPF verifier logic, applying the official kernel update is the most effective mitigation. Additionally, organizations should audit and restrict which users or processes have permissions to load or update BPF programs, enforcing the principle of least privilege. Employing kernel lockdown features or mandatory access controls (e.g., SELinux, AppArmor) can help limit unauthorized BPF program loading. Monitoring kernel logs for unusual BPF activity or locking violations can provide early detection of exploitation attempts. Network and system administrators should review the use of sockmap/sockhash BPF maps in their environments and disable or restrict their usage if not required. For containerized environments, ensure that container runtimes do not grant excessive capabilities (like CAP_BPF or CAP_SYS_ADMIN) that allow untrusted containers to load arbitrary BPF programs. Finally, maintain a robust patch management process to quickly deploy kernel updates across all Linux systems, especially those exposed to untrusted users or networks.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-06-21T10:12:11.509Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9821c4522896dcbdde34

Added to database: 5/21/2025, 9:08:49 AM

Last enriched: 6/28/2025, 3:56:44 AM

Last updated: 7/25/2025, 1:40:34 PM

Views: 13

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats