CVE-2024-26987

5.5 MEDIUM

📋 TL;DR

A deadlock vulnerability in the Linux kernel's memory failure handling when hugetlb_optimize_vmemmap is enabled. This can cause system hangs or crashes when attempting to offline poisoned huge pages. Affects Linux systems with hugetlb pages and the vmemmap optimization feature enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions with hugetlb vmemmap optimization support up to the fix (specific versions in git commits provided)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when hugetlb_optimize_vmemmap is enabled (CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y) and hugetlb pages are in use.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

System deadlock leading to complete unresponsiveness, requiring hard reboot and potential data loss or corruption.

🟠

Likely Case

System hang or crash when memory failure handling is triggered on hugetlb pages, disrupting services and requiring reboot.

🟢

If Mitigated

No impact if hugetlb_optimize_vmemmap is disabled or if memory failure events don't occur on hugetlb pages.

🌐 Internet-Facing: LOW - Requires local access or ability to trigger memory failures on hugetlb pages.
🏢 Internal Only: MEDIUM - Local users or processes could potentially trigger the deadlock, causing system instability.

🎯 Exploit Status

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

Exploitation requires ability to trigger memory failure handling on hugetlb pages, which typically requires privileged access or specific hardware conditions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits: 1983184c22dd84a4d95a71e5c6775c2638557dc7, 49955b24002dc16a0ae2e83a57a2a6c863a1845c, 5ef7ba2799a3b5ed292b8f6407376e2c25ef002e, 882e1180c83f5b75bae03d0ccc31ccedfe5159de

Vendor Advisory: https://git.kernel.org/stable/c/1983184c22dd84a4d95a71e5c6775c2638557dc7

Restart Required: Yes

Instructions:

1. Update to a kernel version containing the fix commits. 2. Check your distribution's security advisories for backported patches. 3. Reboot the system after kernel update.

🔧 Temporary Workarounds

Disable hugetlb vmemmap optimization

linux

Turn off the hugetlb_optimize_vmemmap feature to prevent the deadlock condition

echo 0 > /sys/kernel/mm/hugepages/hugepages-<size>kB/optimize_vmemmap

Avoid using hugetlb pages

linux

Disable hugetlb page usage if not required

echo 0 > /proc/sys/vm/nr_hugepages

🧯 If You Can't Patch

  • Disable hugetlb_optimize_vmemmap feature via sysfs
  • Monitor for memory failure events and system hangs, have reboot procedures ready

🔍 How to Verify

Check if Vulnerable:

Check if hugetlb_optimize_vmemmap is enabled: cat /sys/kernel/mm/hugepages/hugepages-*/optimize_vmemmap | grep -v ^0$

Check Version:

uname -r

Verify Fix Applied:

Check kernel version includes fix commits: uname -r and verify with distribution patch notes

📡 Detection & Monitoring

Log Indicators:

  • Kernel logs showing deadlock warnings, circular locking dependency detected messages
  • System hangs or unresponseness when memory operations occur

Network Indicators:

  • None - this is a local kernel issue

SIEM Query:

kernel: "possible circular locking dependency detected" AND "hugetlb_optimize_vmemmap" OR "memory_failure"

🔗 References

📤 Share & Export