CVE-2024-45021

5.5 MEDIUM

📋 TL;DR

This CVE describes a NULL pointer dereference vulnerability in the Linux kernel's memory controller (memcg) event control interface. An attacker with local user access can trigger a kernel oops (crash) by writing malformed data to the memcg event control file. This affects Linux systems with memory cgroups enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated in CVE, but patches are available in stable kernel trees. Likely affects multiple recent kernel versions before fixes were backported.
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires memory cgroups (memcg) to be enabled and accessible. Most modern Linux distributions have this enabled by default.

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

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

Local denial of service causing kernel panic and system crash, potentially leading to data loss or service disruption.

🟠

Likely Case

Local denial of service causing kernel oops and temporary system instability, requiring reboot to restore normal operation.

🟢

If Mitigated

Minimal impact if proper access controls restrict write access to memcg event control files to privileged users only.

🌐 Internet-Facing: LOW - Requires local user access to exploit, not directly reachable from network.
🏢 Internal Only: MEDIUM - Malicious local users or compromised accounts could cause system instability.

🎯 Exploit Status

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

Exploitation requires local user access and ability to write to memcg event control files. The vulnerability is straightforward to trigger with crafted input.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in stable kernel trees (commits referenced in CVE). Specific kernel version numbers depend on distribution backports.

Vendor Advisory: https://git.kernel.org/stable/c/046667c4d3196938e992fba0dfcde570aa85cd0e

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution's repositories. 2. For custom kernels, apply commits from stable kernel tree. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Restrict memcg event control access

linux

Limit write access to memcg event control files to root only

chmod 600 /sys/fs/cgroup/memory/*/memory.pressure_level
chown root:root /sys/fs/cgroup/memory/*/memory.pressure_level

Disable memory cgroups

linux

Remove memory cgroup support if not required (not recommended for production)

Add 'cgroup_disable=memory' to kernel boot parameters

🧯 If You Can't Patch

  • Implement strict access controls on /sys/fs/cgroup/memory directories
  • Monitor system logs for kernel oops messages and investigate any local user triggering them

🔍 How to Verify

Check if Vulnerable:

Check kernel version and compare with distribution's patched versions. Vulnerable if using unpatched kernel with memory cgroups enabled.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version after update matches patched version from vendor advisory. Check that /sys/fs/cgroup/memory exists and system remains stable.

📡 Detection & Monitoring

Log Indicators:

  • Kernel oops messages in /var/log/kern.log or dmesg output
  • Unexpected system crashes or reboots

Network Indicators:

  • None - local exploitation only

SIEM Query:

source="kern.log" AND "Oops" AND "memcg" OR source="dmesg" AND "general protection fault"

🔗 References

📤 Share & Export