CVE-2025-39821

7.8 HIGH

📋 TL;DR

A Linux kernel vulnerability in the perf subsystem allows undefined behavior when handling disabled performance monitoring events during throttling. This can lead to kernel instability or crashes when specific event configurations trigger the bug. Systems running vulnerable Linux kernel versions with performance monitoring enabled are affected.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific versions not specified in CVE, but patches are available in stable kernel trees
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Requires CONFIG_PERF_EVENTS=y and specific perf event configurations with disabled child events in throttled groups.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic or system crash due to undefined behavior in PMU driver operations, potentially causing denial of service.

🟠

Likely Case

Kernel warnings from UBSAN (Undefined Behavior Sanitizer) and potential system instability when specific perf event configurations are used.

🟢

If Mitigated

No impact if performance monitoring is disabled or if vulnerable configurations aren't used.

🌐 Internet-Facing: LOW - Requires local access and specific perf subsystem configuration.
🏢 Internal Only: MEDIUM - Local users or processes with perf monitoring privileges could trigger the issue.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Syzkaller reproducer exists, requires local access and perf subsystem privileges to trigger.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in stable kernel trees (commits b64fdd422a85025b5e91ead794db9d3ef970e369 and d689135aa9c5e4e0eab5a92bbe35dab0c8d6677f)

Vendor Advisory: https://git.kernel.org/stable/c/b64fdd422a85025b5e91ead794db9d3ef970e369

Restart Required: Yes

Instructions:

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

🔧 Temporary Workarounds

Disable perf subsystem

linux

Disable performance monitoring events subsystem at kernel build time

Rebuild kernel with CONFIG_PERF_EVENTS=n

Restrict perf usage

linux

Limit perf subsystem access via kernel.perf_event_paranoid sysctl

sysctl -w kernel.perf_event_paranoid=3

🧯 If You Can't Patch

  • Restrict perf subsystem access to trusted users only
  • Monitor for UBSAN shift-out-of-bounds warnings in kernel logs

🔍 How to Verify

Check if Vulnerable:

Check kernel logs for UBSAN shift-out-of-bounds warnings related to perf events, or test with syzkaller reproducer if available.

Check Version:

uname -r

Verify Fix Applied:

Check that kernel version includes the fix commits or that UBSAN warnings no longer appear under perf stress testing.

📡 Detection & Monitoring

Log Indicators:

  • UBSAN: shift-out-of-bounds warnings in kernel logs
  • perf-related kernel warnings or crashes

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("UBSAN" OR "shift-out-of-bounds" OR "perf")

🔗 References

📤 Share & Export