Critical Vulnerability in Linux Kernel: virtiofs Memory Allocation Issue
Summary
DEBIAN-CVE-2024-53219: In the Linux kernel, the following vulnerability has been resolved: virtiofs: use pages instead of pointer for kernel direct IO When trying to insert a 10MB kernel module kept in a virtio-fs with cache disabled, the foll... Affects linux versions < 6.12.3-1. Fixed in 6.12.3-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Linux kernel is the core component of many operating systems, managing hardware resources and providing essential services to applications. It is known for its stability, performance, and extensive hardware support. However, it is also susceptible to vulnerabilities that can impact system integrity and performance. This particular vulnerability affects the virtiofs subsystem, which facilitates file sharing between host and guest systems in virtualized environments.
Vulnerability Detail
In the Linux kernel, a vulnerability has been identified in the virtiofs subsystem related to memory allocation during direct I/O operations. When inserting a large kernel module (10MB) stored in a virtio-fs with cache disabled, the system triggers a warning due to excessive memory allocation requests. This can lead to a hang in the finit_module() syscall, as the kernel attempts to allocate memory that exceeds the maximum page order, ultimately resulting in a denial of service. The issue arises from the way virtio-fs handles large read and write operations, which can overwhelm the memory allocation functions.
How To Fix
Minimum fixed version
6.12.3-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can limit the size of kernel modules being inserted into virtio-fs or enable caching to avoid triggering the memory allocation issue. However, this may not be feasible for all use cases.
Conclusion
The vulnerability in the Linux kernel's virtiofs subsystem poses significant risks related to memory allocation during direct I/O operations. Users are urged to update to the latest patched version to mitigate these risks. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.
See every vulnerability recorded for linux →
FAQ
The vulnerability involves excessive memory allocation requests when handling large kernel modules in virtiofs, leading to potential denial of service.
You can use tools like Vulert to monitor and alert for open-source vulnerabilities in your software. Check your application against the vulnerability using the Vulert playground at Vulert Scanner.
Failure to address this vulnerability may result in system hangs and denial of service, impacting the availability of services relying on the Linux kernel.
Yes, the vulnerability affects Linux versions prior to 6.12.3-1 in both Debian 13 and Debian 14.
Update your Linux package to version 6.12.3-1 or later to patch the vulnerability and consider implementing the recommended workarounds until the update is applied.
References
Related vulnerabilities
Recent vulnerabilities recorded for linux.