Race Condition in zsmalloc Package
Summary
GSD-2022-1003184: zsmalloc: fix races between asynchronous zspage free and page migration. Affects Kernel versions >= 77ff465799c60294e248000cd22ae8171da3304c, < 8ba7b7c1dad1f6503c541778f31b33f7f62eb966. No fix is published. 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 zsmalloc package is a component of the Linux Kernel that provides a memory allocator for compressed pages. It is designed to improve memory utilization by compressing and storing memory pages. This package is used in various Linux distributions and is an integral part of the kernel's memory management subsystem. However, a race condition has been discovered in the zsmalloc package, which can lead to potential security vulnerabilities.
Vulnerability Detail
The race condition in the zsmalloc package occurs between asynchronous zspage free and page migration. This vulnerability can be exploited by an attacker to cause memory corruption or trigger a use-after-free condition. By carefully timing their actions, an attacker may be able to manipulate the memory management subsystem and potentially execute arbitrary code with elevated privileges. This vulnerability was introduced in version v4.14 of the Linux Kernel and has been fixed in version v5.17.13.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can disable the zsmalloc package by modifying the kernel configuration and recompiling the kernel without zsmalloc support. However, this may impact memory utilization and performance. Here is an example of how to disable zsmalloc in the kernel configuration:
- Open the kernel configuration file (usually located at /usr/src/linux/.config).
- Find the line that starts with 'CONFIG_ZSMALLOC=y' and change it to 'CONFIG_ZSMALLOC=n'.
- Save the file and recompile the kernel using the updated configuration.
- Install the new kernel and reboot the system.
Conclusion
The race condition in the zsmalloc package can pose a significant security risk, potentially allowing attackers to execute arbitrary code with elevated privileges. It is crucial to update the Linux Kernel to version v5.17.13 or later to mitigate this vulnerability. If you need further assistance or support in addressing this vulnerability, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
Zsmalloc is a memory allocator in the Linux Kernel that compresses and stores memory pages to improve memory utilization.
This vulnerability can lead to memory corruption or a use-after-free condition, potentially allowing an attacker to execute arbitrary code with elevated privileges.
The vulnerability was introduced in version v4.14 of the Linux Kernel and has been fixed in version v5.17.13.
To fix this vulnerability, update the Linux Kernel to version v5.17.13 or later.
Yes, users can disable the zsmalloc package by modifying the kernel configuration and recompiling the kernel without zsmalloc support.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.