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

Not scored Published Updated

A memory leak in the Linux kernel nvmem core allows local attackers to cause resource exhaustion and denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Not stated
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50734?

CVE-2022-50734 is a memory corruption vulnerability in Linux, published on 24 Dec 2025.

Official 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.

Which versions are affected by CVE-2022-50734?

How do I fix CVE-2022-50734?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2022-50734 being exploited?

There is no known exploitation of CVE-2022-50734 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2022-50734, GHSA-p8g3-3wvp-3jxw, UBUNTU-CVE-2022-50734.

Is CVE-2022-50734 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free