CVE-2022-50343 rapidio: fix possible name leaks when rio_add_device() fails

Medium 5.5 Published Updated

A memory leak in the Linux kernel's RapidIO subsystem allows attackers to cause denial of service by triggering error paths in device registration.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50343?

CVE-2022-50343 is a medium-severity memory corruption vulnerability in Linux kernel, published on 16 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

rapidio: fix possible name leaks when rio_add_device() fails

Patch series "rapidio: fix three possible memory leaks".

This patchset fixes three name leaks in error handling. - patch #1 fixes two name leaks while rio_add_device() fails. - patch #2 fixes a name leak while rio_register_mport() fails.

This patch (of 2):

If rio_add_device() returns error, the name allocated by dev_set_name() need be freed. It should use put_device() to give up the reference in the error path, so that the name can be freed in kobject_cleanup(), and the 'rdev' can be freed in rio_release_dev().

Weakness: CWE-401

Which versions are affected by CVE-2022-50343?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50343?

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

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50343, GHSA-q25c-43pj-xx2h, UBUNTU-CVE-2022-50343.

Is CVE-2022-50343 in your software?

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

Check your SBOMs for free