regmap: set debugfs_name to NULL after it is freed
Summary
GSD-2021-1000437: regmap: set debugfs_name to NULL after it is freed. Affects Kernel versions >= 480c5e9c7e4c76c01d5f1f7b73832d7b77e6b427, < d8897f7b2283a500666c85ef06e820df38ed7b52. 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 ecosystem. It provides a framework for accessing and manipulating hardware registers in a device-independent manner. The package allows drivers to read from and write to hardware registers using a common API. The debugfs_name variable is used to store the name of the debugfs entry associated with a regmap instance. Debugfs is a virtual file system in Linux that allows developers to add debugging information to their code. The vulnerability in regmap arises from not setting the debugfs_name variable to NULL after it is freed, which can lead to a use-after-free vulnerability.
Vulnerability Detail
The vulnerability in regmap occurs when the debugfs_name variable is not properly handled. After the debugfs_name variable is freed, it is not set to NULL, leaving a dangling pointer. An attacker could potentially exploit this vulnerability by manipulating the freed debugfs_name pointer to execute arbitrary code or cause a denial-of-service condition. The impact and attack plausibility of this vulnerability have not been proven yet. The vulnerability was introduced in Linux Kernel version v5.4.90 and fixed in version v5.4.119.
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 →
Conclusion
The regmap package in the Linux Kernel is vulnerable to a use-after-free vulnerability when the debugfs_name variable is not properly handled. To fix this vulnerability, developers should set the debugfs_name variable to NULL after it is freed. It is recommended to update to the fixed version of the regmap package (v5.4.119 or later) to ensure the vulnerability is patched. 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 ecosystem that provides a framework for accessing and manipulating hardware registers in a device-independent manner.
Debugfs is a virtual file system in Linux that allows developers to add debugging information to their code.
A use-after-free vulnerability occurs when a program continues to use a memory reference after it has been freed, leading to potential security issues.
An attacker could potentially exploit this vulnerability by manipulating the freed debugfs_name pointer to execute arbitrary code or cause a denial-of-service condition.
The impact and attack plausibility of this vulnerability have not been proven yet.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.