Double-Free Vulnerability in regmap Package
Summary
GSD-2021-1002205: regmap: Fix possible double-free in regcache_rbtree_exit(). Affects Kernel versions >= 3f4ff561bc88b074d5e868dde4012d89cbb06c87, < 55e6d8037805b3400096d621091dfbf713f97e83. 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 regmap package is a component of the Linux Kernel, which is responsible for managing register maps for various hardware devices. It provides an abstraction layer for accessing and manipulating device registers. The regcache_rbtree_exit() function within the regmap package is susceptible to a double-free vulnerability.
Vulnerability Detail
The double-free vulnerability in regcache_rbtree_exit() can be exploited by an attacker to cause a denial-of-service (DoS) condition or potentially execute arbitrary code. This vulnerability arises when the regcache_rbtree_exit() function is called multiple times, leading to a double-free of the same memory region. An attacker could craft a malicious input to trigger this vulnerability and potentially gain control over the affected system.
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 avoid the double-free vulnerability by refraining from calling the regcache_rbtree_exit() function multiple times. It is important to ensure that the function is only called once to prevent the double-free issue. Here is an example of how to use the function correctly:
regcache_rbtree_exit(regmap);
Conclusion
The double-free vulnerability in the regmap package can lead to a denial-of-service (DoS) condition or potential code execution. It is crucial to update the Linux Kernel to version v5.15 or later to mitigate this vulnerability. Additionally, users can follow the recommended workaround to avoid the issue. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
Regmap is a component of the Linux Kernel that manages register maps for hardware devices. It provides an abstraction layer for accessing and manipulating device registers.
A double-free vulnerability occurs when a program or system attempts to free the same memory region twice. This can lead to memory corruption and potentially be exploited by attackers.
This vulnerability can result in a denial-of-service (DoS) condition or potentially allow an attacker to execute arbitrary code on the affected system.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.15 or later, which includes the necessary patch to address the double-free issue.
Yes, a workaround for this vulnerability is to ensure that the regcache_rbtree_exit() function is only called once and not multiple times.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.