CVE-2024-38569
kernel: drivers/perf: hisi_pcie: Fix out-of-bound access when valid event group
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · June 19, 2024
Updated · October 17, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
drivers/perf: hisi_pcie: 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 HISI_PCIE_MAX_COUNTERS, 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/}'
Statement
A low severity flaw was found in the Linux kernel HiSilicon PCIe Performance Monitoring Unit (PMU) driver (drivers/perf/hisi_pcie). The driver did not validate the array index when writing events to the event_group array, so if a perf event group contained more events than the driver's maximum number of counters (HISI_PCIE_MAX_COUNTERS), an out-of-bounds memory write occurred. On systems using the affected hardware, a local attacker with the high privileges needed to run the perf tool could exploit this flaw to crash the kernel, causing a denial of service; confidentiality and integrity are not impacted. Red Hat Enterprise Linux kernel and kernel-rt update streams and the other Red Hat products in scope are not affected by this flaw because the vulnerable hisi_pcie driver code is not built into the Red Hat kernels shipped for these products. The Red Hat severity for this flaw is therefore Low (Red Hat CVSS 4.4, AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H). The higher upstream scores (CVSS 7.8, Important, from NIST and CVE.org) reflect a generic assessment of the upstream kernel code and do not account for the affected driver being absent from Red Hat builds.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 4.4CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
CWE-125 · Out-of-bounds Read