# CVE-2022-50734: nvmem: core: Fix memleak in nvmem_register()

- Severity: not scored yet
- 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.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2025-12-24T12:22:53.333Z
- Modified: 2026-11-10T12:10:00.177Z
- Assigned by: Linux

## Description

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

nvmem: core: Fix memleak in nvmem_register()

dev_set_name will alloc memory for nvmem->dev.kobj.name in
nvmem_register, when nvmem_validate_keepouts failed, nvmem's
memory will be freed and return, but nobody will free memory
for nvmem->dev.kobj.name, there will be memleak, so moving
nvmem_validate_keepouts() after device_register() and let
the device core deal with cleaning name in error cases.

(As written by CVE List.)

## Affected

- Linux Linux: from de0534df93474f268486c486ea7e01b44a478026 before 9391cc3a787a58aa224a6440d7f244d780ba2896; from de0534df93474f268486c486ea7e01b44a478026 before 2bd2774df0ce37920b23819a860a66fdbdd90823; from de0534df93474f268486c486ea7e01b44a478026 before b6054b9b239a493672f853b034570cca93ba7a88; from de0534df93474f268486c486ea7e01b44a478026 before bd1244561fa2a4531ded40dbf09c9599084f8b29; c1d44b93ca9f3ebc26b0de0a7f4b7156702762b6; 63c2b13ba0428b8f477e4adb1d40a50eb4493c09; from 5.13.19 before 5.14; from 5.14.6 before 5.15; 5.15 (not affected: before 5.15; from 5.15.75 up to 5.15.*; from 5.19.17 up to 5.19.*; from 6.0.3 up to 6.0.*; from 6.1 up to *)

## References

- <https://git.kernel.org/stable/c/9391cc3a787a58aa224a6440d7f244d780ba2896>
- <https://git.kernel.org/stable/c/2bd2774df0ce37920b23819a860a66fdbdd90823>
- <https://git.kernel.org/stable/c/b6054b9b239a493672f853b034570cca93ba7a88>
- <https://git.kernel.org/stable/c/bd1244561fa2a4531ded40dbf09c9599084f8b29>

## Sources

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

---

Page: https://cve.day/CVE-2022-50734 · Whole record: https://cve.day/CVE-2022-50734.json · Rebuilt by cve.day 2026-11-25T22:58:21.339Z
