Vulnerability in Kernel: mm: memcg: synchronize objcg lists with a dedicated spinlock
Summary
GSD-2022-1000444: mm: memcg: synchronize objcg lists with a dedicated spinlock. Affects Kernel versions >= bf4f059954dcb221384b2f784677e19a13cd4bdb, < 956cf21cd1ae1de63dd5850e2e287641cb4cc34a. 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 Kernel is a critical component of the Linux operating system that manages system resources and facilitates communication between hardware and software. It provides essential functionalities such as process management, memory management, and device drivers. The mm (memory management) subsystem within the Kernel is responsible for managing memory allocation and deallocation. One aspect of memory management is the control group (memcg) mechanism, which allows for resource isolation and accounting within the Kernel. This vulnerability specifically affects the synchronization of objcg lists within the memcg subsystem.
Vulnerability Detail
The vulnerability arises from a lack of proper synchronization of objcg lists within the memcg subsystem. Without a dedicated spinlock to protect these lists, concurrent access from multiple threads or processes can lead to race conditions and potential memory corruption. An attacker could potentially exploit this vulnerability to gain unauthorized access to sensitive information, modify memory contents, or cause a denial-of-service condition. The vulnerability was introduced in version v5.9 of the Linux Kernel and has been fixed in version v5.15.24.
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 workaround, users can apply a patch that introduces the necessary synchronization using a dedicated spinlock. The following code snippet demonstrates the patch:
/* Patch to synchronize objcg lists with a dedicated spinlock */
#include <linux/spinlock.h>
static DEFINE_SPINLOCK(objcg_lock);
void synchronize_objcg_lists(void)
{
spin_lock(&objcg_lock);
/* Synchronization logic goes here */
spin_unlock(&objcg_lock);
}
Please note that this workaround is not a permanent solution and should be replaced with the official fix as soon as possible.
Conclusion
In conclusion, the vulnerability in the Kernel's mm subsystem related to the synchronization of objcg lists within the memcg mechanism can lead to potential memory corruption and unauthorized access. It is crucial to update the Linux Kernel to version v5.15.24 or later to mitigate this vulnerability. Applying the provided workaround patch can serve as a temporary solution until the official fix is applied. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can potentially allow an attacker to gain unauthorized access to sensitive information, modify memory contents, or cause a denial-of-service condition.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will analyze it for any open-source vulnerabilities, including this one.
Yes, a temporary workaround is to apply a patch that introduces the necessary synchronization using a dedicated spinlock. The provided code snippet demonstrates the patch.
Yes, this vulnerability has been fixed in version v5.15.24 of the Linux Kernel.
You can find more information about this vulnerability in the GSD-2022-1000444 entry of the GSD Database (https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1000xxx/GSD-2022-1000444.json).
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.