CVE-2024-35879

5.5 MEDIUM

📋 TL;DR

This CVE describes a memory leak vulnerability in the Linux kernel's device tree (OF) subsystem during overlay removal operations. It affects systems using device tree overlays where improper synchronization between devlink removal and node destruction can cause reference count mismatches. This primarily impacts embedded Linux systems and devices using dynamic device tree modifications.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected kernel versions not specified in CVE description; check git commits for exact ranges
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using device tree overlays and performing of_platform_depopulate() followed by of_overlay_remove() operations.

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

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

Memory exhaustion leading to system instability, kernel panic, or denial of service through resource depletion.

🟠

Likely Case

Kernel warning messages in logs and potential minor memory leaks during device tree overlay operations, but unlikely to cause immediate system failure.

🟢

If Mitigated

No impact if systems don't use device tree overlays or if the vulnerability is patched.

🌐 Internet-Facing: LOW - This is a local kernel memory management issue requiring local access or specific device tree operations.
🏢 Internal Only: MEDIUM - Could affect system stability on devices performing frequent device tree modifications, particularly in embedded/IoT environments.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: HIGH

Exploitation requires specific device tree operations and timing conditions; more of a stability issue than security vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in git commits referenced in CVE

Vendor Advisory: https://git.kernel.org/stable/c/3127b2ee50c424a96eb3559fbb7b43cf0b111c7a

Restart Required: Yes

Instructions:

1. Identify affected kernel version. 2. Apply kernel patches from provided git commits. 3. Recompile kernel if using custom build. 4. Reboot system to load patched kernel.

🔧 Temporary Workarounds

Avoid device tree overlay removal sequences

linux

Avoid calling of_platform_depopulate() followed by of_overlay_remove() in affected systems

🧯 If You Can't Patch

  • Monitor kernel logs for memory leak warnings related to of_node_put()
  • Restrict device tree modification operations to essential maintenance only

🔍 How to Verify

Check if Vulnerable:

Check kernel version and review if device tree overlay operations are performed. Monitor dmesg for 'ERROR: memory leak, expected refcount 1 instead of 2' warnings.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes patches from referenced git commits. Test device tree overlay removal operations and ensure no memory leak warnings appear.

📡 Detection & Monitoring

Log Indicators:

  • ERROR: memory leak, expected refcount 1 instead of 2
  • WARNING: of_node_put
  • kernel memory leak warnings during device tree operations

SIEM Query:

source="kernel" AND ("memory leak" OR "refcount" OR "of_node_put")

🔗 References

📤 Share & Export