regmap: set debugfs_name to NULL after it is freed
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ cffa4b2122f5f3e53cf3d529bbc74651f95856d5 · < e41a962f82e7afb5b1ee644f48ad0b3aee656268| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's regmap code can leave debugfs_name pointing to freed memory when the cache is reinitialized. This creates a potential use-after-free; the input does not specify an attack path, authentication requirements, or user interaction.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.