CVE-2024-38569 drivers/perf: hisi_pcie: Fix out-of-bound access when valid event group

High 7.8 Published Updated

A local attacker can trigger an out-of-bounds write in the HiSilicon PCIe perf 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-38569?

CVE-2024-38569 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_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/}'

Weakness: CWE-129

Which versions are affected by CVE-2024-38569?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-38569?

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-38569 being exploited?

There is no known exploitation of CVE-2024-38569 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-38569, DEBIAN-CVE-2024-38569, GHSA-fr6h-wc99-8m37, UBUNTU-CVE-2024-38569.

Is CVE-2024-38569 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free