CVE-2025-38565

7.8 HIGH

📋 TL;DR

A Linux kernel vulnerability in the perf subsystem causes a reference count leak when memory allocation fails during perf_mmap(). This can lead to resource exhaustion and potential denial of service. Systems running affected Linux kernel versions with perf events enabled are vulnerable.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not specified in CVE, but patches exist in stable kernel trees
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires perf subsystem to be enabled and accessible. Most distributions enable perf by default for privileged users.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Sustained exploitation could exhaust kernel resources, causing system instability, crashes, or denial of service affecting all processes.

🟠

Likely Case

Local attackers could trigger repeated failures to gradually degrade system performance or cause targeted service disruptions.

🟢

If Mitigated

With proper access controls limiting perf event usage, impact is minimal as only privileged users can trigger the vulnerability.

🌐 Internet-Facing: LOW - Requires local access to exploit
🏢 Internal Only: MEDIUM - Local users or compromised accounts could exploit this

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires local access and ability to trigger perf_mmap() failures. Exploitation would need to repeatedly trigger the condition to cause noticeable impact.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patched in stable kernel versions via the provided git commits

Vendor Advisory: https://git.kernel.org/stable/c/07091aade394f690e7b655578140ef84d0e8d7b0

Restart Required: Yes

Instructions:

1. Update to a patched kernel version from your distribution vendor. 2. Reboot the system to load the new kernel. 3. Verify the fix is applied by checking kernel version.

🔧 Temporary Workarounds

Restrict perf event access

linux

Limit perf event usage to trusted users only by adjusting kernel.perf_event_paranoid sysctl

sysctl -w kernel.perf_event_paranoid=3

Disable perf events

linux

Prevent perf subsystem usage by setting kernel.perf_event_paranoid to maximum

sysctl -w kernel.perf_event_paranoid=4

🧯 If You Can't Patch

  • Implement strict access controls to limit perf event usage to essential privileged users only
  • Monitor system resource usage and perf event activity for abnormal patterns

🔍 How to Verify

Check if Vulnerable:

Check kernel version against your distribution's security advisories. Vulnerable if running unpatched kernel with perf enabled.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes one of the referenced git commits or check with your distribution's security update verification tools.

📡 Detection & Monitoring

Log Indicators:

  • Kernel oops messages related to perf or memory allocation failures
  • System logs showing abnormal perf event activity

Network Indicators:

  • None - local vulnerability only

SIEM Query:

Search for kernel logs containing 'perf_mmap' failures or 'perf_rdpmc_allowed' reference count warnings

🔗 References

📤 Share & Export