Skip to main content

CVE-2024-36966: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-36966cvecve-2024-36966
Published: Sat Jun 08 2024 (06/08/2024, 12:52:59 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: erofs: reliably distinguish block based and fscache mode When erofs_kill_sb() is called in block dev based mode, s_bdev may not have been initialised yet, and if CONFIG_EROFS_FS_ONDEMAND is enabled, it will be mistaken for fscache mode, and then attempt to free an anon_dev that has never been allocated, triggering the following warning: ============================================ ida_free called for id=0 which is not allocated. WARNING: CPU: 14 PID: 926 at lib/idr.c:525 ida_free+0x134/0x140 Modules linked in: CPU: 14 PID: 926 Comm: mount Not tainted 6.9.0-rc3-dirty #630 RIP: 0010:ida_free+0x134/0x140 Call Trace: <TASK> erofs_kill_sb+0x81/0x90 deactivate_locked_super+0x35/0x80 get_tree_bdev+0x136/0x1e0 vfs_get_tree+0x2c/0xf0 do_new_mount+0x190/0x2f0 [...] ============================================ Now when erofs_kill_sb() is called, erofs_sb_info must have been initialised, so use sbi->fsid to distinguish between the two modes.

AI-Powered Analysis

AILast updated: 06/29/2025, 10:42:03 UTC

Technical Analysis

CVE-2024-36966 is a vulnerability identified in the Linux kernel's implementation of the EROFS (Enhanced Read-Only File System). The issue arises in the function erofs_kill_sb(), which is responsible for cleaning up superblock structures when the filesystem is unmounted. Specifically, when operating in block device based mode with the CONFIG_EROFS_FS_ONDEMAND kernel configuration enabled, the function may incorrectly interpret the mode due to uninitialized s_bdev (block device) pointers. This leads to an attempt to free an anon_dev structure that was never allocated, triggering a kernel warning and potentially causing instability or a kernel panic. The root cause is that erofs_kill_sb() did not reliably distinguish between block device based mode and fscache mode, resulting in erroneous resource deallocation. The fix involves ensuring that erofs_sb_info is properly initialized and using its fsid field to differentiate the modes correctly before freeing resources. Although no known exploits are reported in the wild, this vulnerability can cause denial of service conditions by crashing or destabilizing the kernel when the affected filesystem is unmounted. The vulnerability affects Linux kernel versions containing the specified commit (aca740cecbe57b12bd9c1fc632092af5ebacda0c) and likely impacts systems using EROFS with on-demand loading enabled. This is a low-level kernel flaw that could affect any Linux distribution incorporating the vulnerable kernel version and configuration.

Potential Impact

For European organizations, the primary impact of CVE-2024-36966 is the potential for denial of service (DoS) through kernel crashes or instability when unmounting EROFS filesystems configured with on-demand loading. This could disrupt critical services or applications relying on Linux servers, particularly those using EROFS for container images, embedded systems, or specialized storage scenarios. While confidentiality and integrity impacts are unlikely, availability could be compromised, leading to downtime and operational disruption. Organizations running Linux kernels with this vulnerability in production environments may experience unexpected reboots or kernel panics, affecting service continuity. Given that EROFS is a read-only filesystem often used in embedded or containerized environments, the threat is more relevant to sectors relying on such technologies, including telecommunications, automotive, and cloud infrastructure providers in Europe. The absence of known exploits reduces immediate risk, but the vulnerability should be addressed proactively to prevent potential exploitation or accidental triggering during maintenance operations.

Mitigation Recommendations

To mitigate CVE-2024-36966, European organizations should: 1) Identify Linux systems running kernel versions containing the vulnerable commit and verify if CONFIG_EROFS_FS_ONDEMAND is enabled. 2) Apply the official Linux kernel patches that correct the erofs_kill_sb() function to properly initialize erofs_sb_info and distinguish modes before resource deallocation. 3) If immediate patching is not feasible, consider disabling the EROFS on-demand feature temporarily to avoid triggering the faulty code path. 4) Implement robust monitoring for kernel warnings and crashes related to EROFS unmount operations to detect potential exploitation or accidental triggers. 5) Test kernel updates in staging environments to ensure compatibility and stability before deployment. 6) Maintain up-to-date backups and recovery plans to minimize downtime in case of kernel instability. 7) Engage with Linux distribution vendors for timely security updates and advisories related to this vulnerability. These steps go beyond generic advice by focusing on configuration verification, targeted patching, and operational monitoring specific to the EROFS filesystem and its on-demand feature.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-30T15:25:07.081Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9829c4522896dcbe2802

Added to database: 5/21/2025, 9:08:57 AM

Last enriched: 6/29/2025, 10:42:03 AM

Last updated: 8/20/2025, 8:29:59 AM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats