regmap: maple: free entry on mas_store_gfp() failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
regmap: maple: free entry on mas_store_gfp() failure
regcache_maple_write() allocates a new block ('entry') to merge adjacent ranges and then stores it with mas_store_gfp(). When mas_store_gfp() fails, the new 'entry' remains allocated and is never freed, leaking memory.
Free 'entry' on the failure path; on success continue freeing the replaced neighbor blocks ('lower', 'upper').
From the CVE record · Linux
The Linux kernel's regmap maple cache leaks memory if mas_store_gfp() fails while storing a newly allocated entry. The input does not describe how an attacker could trigger the failure or specify network, authentication, or user-interaction conditions.
Teams running the Linux kernel should check their versions; affected versions are not specified in the input.