CVE-2022-50557 pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()

Not scored Published Updated

A memory leak in the Linux kernel Thunderbay pinctrl driver can lead to 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-50557?

CVE-2022-50557 is a memory corruption vulnerability in Linux, published on 22 Oct 2025.

Official description

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

pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()

The thunderbay_add_functions() will free memory of thunderbay_funcs when everything is ok, but thunderbay_funcs will not be freed when thunderbay_add_functions() fails, then there will be a memory leak, so we need to add kfree() when thunderbay_add_functions() fails to fix it.

In addition, doing some cleaner works, moving kfree(funcs) from thunderbay_add_functions() to thunderbay_build_functions().

Which versions are affected by CVE-2022-50557?

How do I fix CVE-2022-50557?

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-50557 being exploited?

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

Sources

Also known as DEBIAN-CVE-2022-50557, GHSA-hjpq-cx8h-9x2f, UBUNTU-CVE-2022-50557.

Is CVE-2022-50557 in your software?

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

Check your SBOMs for free