CVE-2022-50165 wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()`

Medium 5.5 Published Updated

An uninitialized variable in the wil6210 debugfs interface could lead to undefined behavior, requiring a kernel patch to resolve.

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-50165?

CVE-2022-50165 is a medium-severity vulnerability in Linux kernel, published on 18 Jun 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:

wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()`

Commit 7a4836560a61 changes simple_write_to_buffer() with memdup_user() but it forgets to change the value to be returned that came from simple_write_to_buffer() call. It results in the following warning:

warning: variable 'rc' is uninitialized when used here [-Wuninitialized] return rc; ^~

Remove rc variable and just return the passed in length if the memdup_user() succeeds.

Weakness: CWE-908

Which versions are affected by CVE-2022-50165?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50165?

Apply the vendor's patch.

Is CVE-2022-50165 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50165, GHSA-q529-wqg7-hj25, UBUNTU-CVE-2022-50165.

Is CVE-2022-50165 in your software?

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

Check your SBOMs for free