CVE-2024-36966

5.5 MEDIUM

📋 TL;DR

A race condition vulnerability in the Linux kernel's EROFS filesystem implementation can cause a kernel warning when mounting fails. This occurs when the system incorrectly identifies the filesystem mode during cleanup, potentially leading to system instability. Systems using Linux kernel with EROFS support and CONFIG_EROFS_FS_ONDEMAND enabled are affected.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Linux kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions with vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Requires CONFIG_EROFS_FS=y and CONFIG_EROFS_FS_ONDEMAND=y kernel configuration options enabled. Not all distributions enable these 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic or system crash due to improper memory handling during filesystem cleanup, causing denial of service.

🟠

Likely Case

Kernel warning messages in system logs and potential mount failures for EROFS filesystems, but no privilege escalation or data corruption.

🟢

If Mitigated

Minor system log noise with no operational impact when proper kernel patches are applied.

🌐 Internet-Facing: LOW - This is a local filesystem issue requiring local access or specific mount operations.
🏢 Internal Only: MEDIUM - Internal systems mounting EROFS filesystems could experience mount failures or system instability.

🎯 Exploit Status

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

Exploitation requires triggering specific race conditions during EROFS mount operations. This appears to be an unintentional bug rather than a security vulnerability designed for exploitation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with commits 7af2ae1b1531feab5d38ec9c8f472dc6cceb4606 or later

Vendor Advisory: https://git.kernel.org/stable/c/7af2ae1b1531feab5d38ec9c8f472dc6cceb4606

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel package. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable EROFS ondemand support

linux

Disable CONFIG_EROFS_FS_ONDEMAND kernel configuration to prevent the vulnerable code path

echo "options erofs nodemand" > /etc/modprobe.d/erofs.conf
update-initramfs -u
reboot

Avoid EROFS mounts

linux

Prevent mounting of EROFS filesystems until patched

chmod 000 /sbin/mount.erofs
echo "erofs" >> /etc/modprobe.d/blacklist.conf

🧯 If You Can't Patch

  • Monitor system logs for 'ida_free called for id=0' warnings and investigate any EROFS mount failures
  • Implement strict access controls to prevent unauthorized users from mounting filesystems

🔍 How to Verify

Check if Vulnerable:

Check kernel version and configuration: uname -r && grep -i erofs /boot/config-$(uname -r)

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version contains fix commit: git log --oneline | grep -i "7af2ae1b1531feab5d38ec9c8f472dc6cceb4606"

📡 Detection & Monitoring

Log Indicators:

  • Kernel log messages containing 'ida_free called for id=0 which is not allocated'
  • EROFS mount failures in system logs

Network Indicators:

  • None - this is a local filesystem issue

SIEM Query:

source="kernel" AND "ida_free called for id=0" OR "EROFS" AND "mount" AND "fail"

🔗 References

📤 Share & Export