CVE-2021-47058: regmap: set debugfs_name to NULL after it is freed
In the Linux kernel, the following vulnerability has been resolved:
regmap: set debugfs_name to NULL after it is freed
There is a upstream commit cffa4b2122f5("regmap:debugfs:
Fix a memory leak when calling regmap_attach_dev") that
adds a if condition when create name for debugfs_name.
With below function invoking logical, debugfs_name is
freed in regmap_debugfs_exit(), but it is not created again
because of the if condition introduced by above commit.
regmap_reinit_cache()
regmap_debugfs_exit()
...
regmap_debugfs_init()
So, set debugfs_name to NULL after it is freed.
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue is a memory handling bug in the regmap debugfs cleanup and reinitialization path. A freed debugfs_name pointer was not cleared, so later initialization could treat stale memory as valid. Public sources do not provide CVSS, impact detail, or evidence of active exploitation.
Executive priority
Treat this as routine kernel maintenance unless internal context raises exposure. There is no public exploitation evidence or severity score in the provided sources, but kernel memory defects should still be closed through normal patch governance.
Technical view
The regmap_debugfs_exit() path frees debugfs_name, but prior logic could prevent regmap_debugfs_init() from recreating it because the pointer still appeared set. The fix sets debugfs_name to NULL after free. The affected data lists Linux kernel versions and stable commit ranges, but gives no CWE or exploitability assessment.
Likely exposure
Exposure is limited to systems running affected Linux kernels with the regmap debugfs reinitialization path reachable. The source bundle does not identify specific distributions, device classes, configurations, or public-facing services as affected.
Exploitation context
The CVE is not listed as KEV in the provided bundle, and no cited source reports active exploitation. The available record describes a kernel memory lifecycle defect, not a remote exploit path or attacker prerequisites.
Researcher notes
The record centers on regmap_debugfs_exit(), regmap_debugfs_init(), and regmap_reinit_cache() behavior after upstream commit cffa4b2122f5. Evidence supports a stale freed pointer condition. Impact, attacker control, and reachable configurations are not established in the provided sources.
Mitigation direction
Update to a vendor-supported kernel containing the referenced stable fixes.
Check your Linux distribution advisory for backported CVE-2021-47058 coverage.
Prioritize kernel updates on systems using affected 4.19, 5.4, 5.10, 5.11, 5.12, or 5.13 lines.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47058 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.