# CVE-2023-52929: nvmem: core: fix cleanup after dev_set_name()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 16% of CVEs (2026-12-01)
- Published: 2025-03-27T16:37:11.396Z
- Modified: 2026-06-17T06:43:57.387Z
- Weaknesses: CWE-459
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

nvmem: core: fix cleanup after dev_set_name()

If dev_set_name() fails, we leak nvmem->wp_gpio as the cleanup does not
put this. While a minimal fix for this would be to add the gpiod_put()
call, we can do better if we split device_register(), and use the
tested nvmem_release() cleanup code by initialising the device early,
and putting the device.

This results in a slightly larger fix, but results in clear code.

Note: this patch depends on "nvmem: core: initialise nvmem->id early"
and "nvmem: core: remove nvmem_config wp_gpio".

[Srini: Fixed subject line and error code handing with wp_gpio while applying.]

(As written by CVE List.)

## Affected

- Linux Linux: from a19a0f67dbb89ad2bfc466f2003841acba645884 before 23676ecd2eb377f7c24a6ff578b0f4c7135658b6; from 14eea6449473c1f55e196cc104ba16d144465869 before 8f9c4b2a3b132bf6698e477aba6ee194b40c75f4; from 5544e90c81261e82e02bbf7c6015a4b9c8c825ef before 39708bc8da7858de0bed9b3a88b3beb1d1e0b443; from 5544e90c81261e82e02bbf7c6015a4b9c8c825ef before 560181d3ace61825f4ca9dd3481d6c0ee6709fa8; 6.1 (not affected: before 6.1; from 6.1.11 up to 6.1.*; from 6.2 up to *)
- linux linux_kernel: from 6.1 before 6.1.11; 6.2

## References

- <https://git.kernel.org/stable/c/23676ecd2eb377f7c24a6ff578b0f4c7135658b6> (patch)
- <https://git.kernel.org/stable/c/8f9c4b2a3b132bf6698e477aba6ee194b40c75f4> (patch)
- <https://git.kernel.org/stable/c/39708bc8da7858de0bed9b3a88b3beb1d1e0b443> (patch)
- <https://git.kernel.org/stable/c/560181d3ace61825f4ca9dd3481d6c0ee6709fa8> (patch)

## Sources

- CVE List: [CVE-2023-52929](https://www.cve.org/CVERecord?id=CVE-2023-52929), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2023-52929](https://nvd.nist.gov/vuln/detail/CVE-2023-52929), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-52929 · Whole record: https://cve.day/CVE-2023-52929.json · Rebuilt by cve.day 2026-11-25T22:58:34.573Z
