Kernel Panic Vulnerability in Linux Package: CVE-2022-49049
Summary
CVE-2022-49049: In the Linux kernel, the following vulnerability has been resolved: mm/secretmem: fix panic when growing a memfd_secret When one tries to grow an existing memfd_secret with ftruncate, one gets a panic [1]. Affects linux versions < 5.17.6-1. Fixed in 5.17.6-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 the Linux operating system, responsible for managing hardware resources and providing essential services to software applications. It is widely used across various platforms, from servers to embedded systems. The vulnerability CVE-2022-49049 affects the 'memfd_secret' feature, which allows for the creation of memory files that are not directly accessible by user space, enhancing security. However, this feature has a flaw that can lead to system instability when resizing memory files.
Vulnerability Detail
CVE-2022-49049 is a vulnerability in the Linux kernel's memory management subsystem, specifically related to the 'memfd_secret' functionality. When a user attempts to grow an existing 'memfd_secret' using the 'ftruncate' system call, the kernel encounters a panic due to improper handling of memory addresses. This occurs because the memory pages are not mapped via the direct map, leading to a failure when the kernel tries to zero out the memory during the resizing process. The panic can cause system crashes, potentially leading to data loss or service interruptions.
How To Fix
Minimum fixed version
5.17.6-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
Currently, there is no specific workaround to prevent the panic when resizing 'memfd_secret'. Users are advised to avoid using the 'ftruncate' command on existing 'memfd_secret' files until the kernel is updated to a patched version.
Conclusion
CVE-2022-49049 is a critical vulnerability in the Linux kernel that can lead to system instability when resizing 'memfd_secret' memory files. Users are encouraged to update their systems to the latest patched version to mitigate this risk. Monitoring tools like Vulert can help keep track of vulnerabilities in open-source software.
See every vulnerability recorded for linux →
FAQ
CVE-2022-49049 is a vulnerability in the Linux kernel that causes a panic when attempting to resize a 'memfd_secret' memory file.
This vulnerability can lead to system crashes and instability, potentially resulting in data loss or service interruptions.
Yes, a patch is available in version 5.17.6-1 and later of the Linux package.
Avoid using the 'ftruncate' command on 'memfd_secret' files until you can update to a patched version.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using a manifest file like package-lock.json. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.
Related vulnerabilities
Recent vulnerabilities recorded for linux.