CVE-2024-57849

7.8 HIGH

📋 TL;DR

A use-after-free vulnerability in the Linux kernel's s390 CPU Measurement Facility (CPUMF) sampling component allows reading from already freed memory buffers during CPU hotplug removal. This can lead to kernel memory corruption, crashes, or potential privilege escalation. Affects Linux systems with s390 architecture running kernel versions with the vulnerable code.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific kernel versions with the vulnerable s390/cpum_sf code (check git commits for exact ranges)
Operating Systems: Linux distributions running on IBM s390/zSeries architecture
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with s390 architecture and CPU Measurement Facility sampling enabled. Requires CPU hotplug operations during active sampling.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic, system crash, or potential privilege escalation leading to full system compromise if an attacker can trigger the race condition and manipulate freed memory.

🟠

Likely Case

System instability, kernel crashes, or invalid sampling data leading to performance monitoring failures.

🟢

If Mitigated

Minor performance impact from sampling failures without system compromise.

🌐 Internet-Facing: LOW - Requires local access and specific s390 architecture.
🏢 Internal Only: MEDIUM - Local users or processes could potentially trigger the race condition on affected s390 systems.

🎯 Exploit Status

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

Requires local access, specific s390 hardware, and ability to trigger CPU hotplug during sampling operations. Race condition exploitation is challenging.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits: 06a92f810df8037ca36157282ddcbefdcaf049b8, 238e3af849dfdcb1faed544349f7025e533f9aab, 99192c735ed4bfdff0d215ec85c8a87a677cb898, a0bd7dacbd51c632b8e2c0500b479af564afadf3, a69752f1e5de817941a2ea0609254f6f25acd274

Vendor Advisory: https://git.kernel.org/stable/c/06a92f810df8037ca36157282ddcbefdcaf049b8

Restart Required: Yes

Instructions:

1. Update to a patched kernel version from your distribution vendor. 2. For custom kernels, apply the relevant git commits. 3. Reboot the system to load the new kernel.

🔧 Temporary Workarounds

Disable CPU hotplug during sampling

s390

Avoid CPU hotplug operations while CPUMF sampling is active to prevent triggering the race condition.

echo 0 > /sys/devices/system/cpu/cpuX/online (to offline specific CPUs before sampling)
Monitor and restrict hotplug operations during sampling periods

🧯 If You Can't Patch

  • Disable CPU Measurement Facility sampling if not required
  • Implement strict access controls to prevent unauthorized users from triggering CPU hotplug or sampling operations

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if running on s390 architecture: uname -a | grep s390 && check if kernel version is before patches

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits: grep -r 'commit_hash' /usr/src/linux-headers-* or check distribution patch notes

📡 Detection & Monitoring

Log Indicators:

  • Kernel oops messages related to cpum_sf, perf events, or memory corruption
  • System crashes during CPU hotplug operations
  • dmesg errors about use-after-free or invalid memory accesses

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("cpum_sf" OR "perf_event_exit_cpu" OR "use-after-free")

🔗 References

📤 Share & Export