CVE-2021-47058
regmap: set debugfs_name to NULL after it is freed
Mitigation
- Upgrade Linux to 5.10.37 or later.
Who should check
- Anyone running Linux >= 5b654b03007917f3f1015b2a5c288c1ea6ae8f65, < 2dc1554d5f0fdaf47cc5bea442b84b9226fea867; >= 480c5e9c7e4c76c01d5f1f7b73832d7b77e6b427, < d8897f7b2283a500666c85ef06e820df38ed7b52; >= c9698380b01aed3281160d3ab25749b57d6913b8, < eb949f891226c012138ffd9df90d1e509f428ae6; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < c764e375ae647832de1ee73d43a4bb3ef8a8f43d; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < b9e569ae1da3a113b3acee8703c94777fd20938a; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < e41a962f82e7afb5b1ee644f48ad0b3aee656268; >= 4.19.168, < 4.19.191; >= 5.4.90, < 5.4.119; >= 5.10.8, < 5.10.37
- Anyone running Linux 5.11
Vulnerability facts
- Affected
- Linux >= 5b654b03007917f3f1015b2a5c288c1ea6ae8f65, < 2dc1554d5f0fdaf47cc5bea442b84b9226fea867; >= 480c5e9c7e4c76c01d5f1f7b73832d7b77e6b427, < d8897f7b2283a500666c85ef06e820df38ed7b52; >= c9698380b01aed3281160d3ab25749b57d6913b8, < eb949f891226c012138ffd9df90d1e509f428ae6; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < c764e375ae647832de1ee73d43a4bb3ef8a8f43d; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < b9e569ae1da3a113b3acee8703c94777fd20938a; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < e41a962f82e7afb5b1ee644f48ad0b3aee656268; >= 4.19.168, < 4.19.191; >= 5.4.90, < 5.4.119; >= 5.10.8, < 5.10.37; Linux 5.11
- Fixed in
- Linux 2dc1554d5f0fdaf47cc5bea442b84b9226fea867, Linux 4.19.191, Linux 5.4.119, Linux 5.10.37
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.25% chance of exploitation in 30 days (percentile 10, 2026-11-26)
- CWE
- CWE-416
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 5b654b03007917f3f1015b2a5c288c1ea6ae8f65, < 2dc1554d5f0fdaf47cc5bea442b84b9226fea867; >= 480c5e9c7e4c76c01d5f1f7b73832d7b77e6b427, < d8897f7b2283a500666c85ef06e820df38ed7b52; >= c9698380b01aed3281160d3ab25749b57d6913b8, < eb949f891226c012138ffd9df90d1e509f428ae6; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < c764e375ae647832de1ee73d43a4bb3ef8a8f43d; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < b9e569ae1da3a113b3acee8703c94777fd20938a; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < e41a962f82e7afb5b1ee644f48ad0b3aee656268; >= 4.19.168, < 4.19.191; >= 5.4.90, < 5.4.119; >= 5.10.8, < 5.10.37 | — | cvelist |
| Linux | 5.11 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-47058. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-47058.md Affected: Linux >= 5b654b03007917f3f1015b2a5c288c1ea6ae8f65, < 2dc1554d5f0fdaf47cc5bea442b84b9226fea867; >= 480c5e9c7e4c76c01d5f1f7b73832d7b77e6b427, < d8897f7b2283a500666c85ef06e820df38ed7b52; >= c9698380b01aed3281160d3ab25749b57d6913b8, < eb949f891226c012138ffd9df90d1e509f428ae6; >= cffa4b2122f5f3e53cf3d52… Fixed in: Linux 2dc1554d5f0fdaf47cc5bea442b84b9226fea867, Linux 4.19.191, Linux 5.4.119, Linux 5.10.37 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/2dc1554d5f0fdaf47cc5bea442b84b9226fea867
- https://git.kernel.org/stable/c/d8897f7b2283a500666c85ef06e820df38ed7b52
- https://git.kernel.org/stable/c/eb949f891226c012138ffd9df90d1e509f428ae6
- https://git.kernel.org/stable/c/c764e375ae647832de1ee73d43a4bb3ef8a8f43d
- https://git.kernel.org/stable/c/b9e569ae1da3a113b3acee8703c94777fd20938a
- https://git.kernel.org/stable/c/e41a962f82e7afb5b1ee644f48ad0b3aee656268
FAQ
Is CVE-2021-47058 being exploited?
There is no confirmed exploitation: CVE-2021-47058 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-47058?
High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2021-47058?
Linux >= 5b654b03007917f3f1015b2a5c288c1ea6ae8f65, < 2dc1554d5f0fdaf47cc5bea442b84b9226fea867; >= 480c5e9c7e4c76c01d5f1f7b73832d7b77e6b427, < d8897f7b2283a500666c85ef06e820df38ed7b52; >= c9698380b01aed3281160d3ab25749b57d6913b8, < eb949f891226c012138ffd9df90d1e509f428ae6; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < c764e375ae647832de1ee73d43a4bb3ef8a8f43d; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < b9e569ae1da3a113b3acee8703c94777fd20938a; >= cffa4b2122f5f3e53cf3d529bbc74651f95856d5, < e41a962f82e7afb5b1ee644f48ad0b3aee656268; >= 4.19.168, < 4.19.191; >= 5.4.90, < 5.4.119; >= 5.10.8, < 5.10.37; Linux 5.11.
Is there a fix for CVE-2021-47058?
Yes. Fixed in Linux 2dc1554d5f0fdaf47cc5bea442b84b9226fea867, Linux 4.19.191, Linux 5.4.119, Linux 5.10.37. Upgrade Linux to 5.10.37 or later.
How do I check if I'm affected by CVE-2021-47058?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.