Skip to main content

CVE-2024-38568: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-38568cvecve-2024-38568
Published: Wed Jun 19 2024 (06/19/2024, 13:35:34 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drivers/perf: hisi: hns3: Fix out-of-bound access when valid event group The perf tool allows users to create event groups through following cmd [1], but the driver does not check whether the array index is out of bounds when writing data to the event_group array. If the number of events in an event_group is greater than HNS3_PMU_MAX_HW_EVENTS, the memory write overflow of event_group array occurs. Add array index check to fix the possible array out of bounds violation, and return directly when write new events are written to array bounds. There are 9 different events in an event_group. [1] perf stat -e '{pmu/event1/, ... ,pmu/event9/}

AI-Powered Analysis

AILast updated: 06/29/2025, 11:26:21 UTC

Technical Analysis

CVE-2024-38568 is a vulnerability identified in the Linux kernel specifically within the drivers/perf subsystem related to the hisi (HiSilicon) hns3 network driver. The issue arises from improper bounds checking when handling event groups created via the perf tool, which is used for performance monitoring. The vulnerability occurs because the driver does not verify whether the array index used to write data into the event_group array exceeds the maximum allowed size, HNS3_PMU_MAX_HW_EVENTS. If a user attempts to create an event group with more than the allowed number of events (9 in this case), it results in an out-of-bounds memory write. This memory corruption can potentially lead to undefined behavior including kernel crashes, data corruption, or privilege escalation if exploited. The fix involves adding proper array index boundary checks to prevent writing beyond the allocated event_group array size and returning early when the limit is exceeded. The vulnerability affects Linux kernel versions identified by the commit hash 66637ab137b44914356a9dc7a9b3f8ebcf0b0695 and was published on June 19, 2024. There are no known exploits in the wild at this time, and no CVSS score has been assigned yet. The flaw is a classic out-of-bounds write vulnerability in a kernel driver component that handles hardware performance monitoring events, which could be triggered by a local user with access to the perf tool and the affected driver.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with the affected hisi hns3 driver, which is commonly found in servers and network equipment using HiSilicon network interface cards. Exploitation could allow a local attacker to cause denial of service through kernel crashes or potentially escalate privileges by corrupting kernel memory. This could disrupt critical infrastructure, cloud services, or enterprise data centers relying on Linux-based systems, impacting availability and integrity of services. Confidentiality impact is less direct but could arise if privilege escalation leads to unauthorized access. Given the perf tool is typically accessible to users with some level of system access, the threat is more relevant in environments where multiple users share systems or where attackers have gained limited user access and seek to escalate privileges. The absence of known exploits reduces immediate risk, but the vulnerability should be addressed promptly to prevent future exploitation. The impact is heightened in sectors with high reliance on Linux servers such as telecommunications, finance, and public sector services in Europe.

Mitigation Recommendations

European organizations should prioritize applying the official Linux kernel patches that include the bounds checking fix for the hns3 driver as soon as they become available. Until patches are deployed, organizations can mitigate risk by restricting access to the perf tool and limiting user permissions to trusted administrators only, thereby reducing the likelihood of exploitation by unprivileged users. Monitoring kernel logs for unusual perf tool activity or kernel errors related to the hns3 driver can provide early detection of attempted exploitation. Network segmentation and strict access controls on systems with HiSilicon network cards can further reduce exposure. Additionally, organizations should maintain up-to-date inventories of hardware and kernel versions to identify affected systems quickly. Security teams should also prepare incident response plans for potential kernel-level compromises and consider deploying kernel integrity monitoring solutions to detect anomalous behavior stemming from memory corruption.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-06-18T19:36:34.923Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9829c4522896dcbe29d3

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

Last enriched: 6/29/2025, 11:26:21 AM

Last updated: 8/18/2025, 11:23:10 PM

Views: 17

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