Race Condition in zsmalloc Package
Summary
GSD-2022-1003451: zsmalloc: fix races between asynchronous zspage free and page migration. Affects Kernel versions >= 77ff465799c60294e248000cd22ae8171da3304c, < 3ec459c8810e658401be428d3168eacfc380bdd0. 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, which provides a memory allocator for compressed pages. It is designed to improve memory utilization and reduce memory fragmentation. The package is responsible for managing zspages, which are compressed memory pages used by the kernel. These zspages can be allocated, freed, and migrated between different memory zones. However, a race condition has been identified in the zsmalloc package, specifically between asynchronous zspage free and page migration operations.
Vulnerability Detail
The race condition in the zsmalloc package occurs when a zspage is freed asynchronously while it is being migrated to a different memory zone. This race condition can lead to various issues, including memory corruption, use-after-free vulnerabilities, and system crashes. An attacker may be able to exploit this vulnerability to gain elevated privileges or execute arbitrary code on the affected system. The vulnerability was introduced in version v4.14 of the Linux Kernel and has been fixed in version v5.15.45.
How To Fix
No fixed version is published for this vulnerability.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.15.45 or later. This update includes the necessary patch to address the race condition in the zsmalloc package. Users can obtain the updated kernel from the official Linux Kernel repository.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to apply the provided fix by updating the Linux Kernel to the recommended version.
Conclusion
The race condition in the zsmalloc package of the Linux Kernel can lead to severe security issues, including memory corruption and privilege escalation. It is crucial to update the kernel to the recommended version to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
zsmalloc is a memory allocator for compressed pages in the Linux Kernel. It aims to improve memory utilization and reduce fragmentation.
A zspage is a compressed memory page used by the zsmalloc package. It can be allocated, freed, and migrated between different memory zones.
A race condition is a software flaw that occurs when multiple threads or processes access shared data concurrently, leading to unexpected and potentially harmful behavior.
The vulnerability can result in memory corruption, use-after-free vulnerabilities, and system crashes. An attacker may exploit this to gain elevated privileges or execute arbitrary code.
To fix this vulnerability, update the Linux Kernel to version v5.15.45 or later, which includes the necessary patch to address the race condition.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.