Critical Double Free Vulnerability in Linux Kernel CIFS Package
Summary
CVE-2022-48919: In the Linux kernel, the following vulnerability has been resolved: cifs: fix double free race when mount fails in cifs_get_root() When cifs_get_root() fails during cifs_smb3_do_mount() we call deactivate_locked_super()... Affects linux versions < 5.10.106-1. Fixed in 5.10.106-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 a core component of many operating systems, providing essential services for hardware management, process control, and system security. The CIFS (Common Internet File System) module allows for file sharing over the network, enabling users to access files on remote servers as if they were local. This module is widely used in various environments, making its security paramount. The vulnerability in question arises from a flaw in the cifs_get_root() function, which can lead to a double free condition, potentially compromising system stability and security.
Vulnerability Detail
The vulnerability, identified as CVE-2022-48919, occurs when the cifs_get_root() function fails during the cifs_smb3_do_mount() process. In this scenario, the function calls deactivate_locked_super(), which triggers delayed_free() to release the context. However, the code erroneously proceeds to free the same resources again, leading to a double free condition. This can result in a use-after-free error, as evidenced by the KASAN report indicating a read of size 8 at an invalid address. The ramifications of this vulnerability include potential system crashes, data corruption, and exploitation by malicious actors to execute arbitrary code.
How To Fix
Minimum fixed version
5.10.106-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 avoid mounting CIFS shares until the kernel is updated. This can be done by refraining from using commands that initiate CIFS mounts, or by using alternative file sharing protocols that do not involve CIFS.
Conclusion
CVE-2022-48919 is a critical vulnerability in the Linux kernel's CIFS module that can lead to significant security risks. Users are strongly advised to update their systems to the latest kernel versions to mitigate these risks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for linux →
FAQ
CVE-2022-48919 is a vulnerability in the Linux kernel's CIFS module that can lead to a double free condition, potentially allowing for system instability and exploitation.
You can use Vulert, a tool that monitors open-source vulnerabilities, to check if your application is affected by CVE-2022-48919. Simply upload your manifest file like package-lock.json to the Vulert playground.
The vulnerability can lead to system crashes, data corruption, and may allow attackers to execute arbitrary code, compromising system security.
You can update your Linux kernel using the package manager with the command: sudo apt-get update && sudo apt-get upgrade linux.
Yes, the permanent fix is to update to the specified patched versions of the Linux kernel that address CVE-2022-48919.
Related vulnerabilities
Recent vulnerabilities recorded for linux.