CVE-2024-38568 drivers/perf: hisi: hns3: Fix out-of-bound access when valid event group
A local attacker can trigger an out-of-bounds write in the HiSilicon HNS3 PMU driver, potentially leading to memory corruption and privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-38568?
CVE-2024-38568 is a high-severity memory corruption vulnerability in Linux kernel, published on 19 Jun 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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/}
Weakness: CWE-129
Which versions are affected by CVE-2024-38568?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-38568?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2024-38568 being exploited?
There is no known exploitation of CVE-2024-38568 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-38568, DEBIAN-CVE-2024-38568, GHSA-2xq5-458f-5cj8, UBUNTU-CVE-2024-38568.