CVE-2022-50642 platform/chrome: cros_ec_typec: zero out stale pointers

Not scored Published Updated

A use-after-free vulnerability in the Linux kernel's Chrome OS Type-C driver allows local attackers to cause denial of service or potentially execute code.

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

What is CVE-2022-50642?

CVE-2022-50642 is an use after free vulnerability in Linux, published on 9 Dec 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:

platform/chrome: cros_ec_typec: zero out stale pointers

`cros_typec_get_switch_handles` allocates four pointers when obtaining type-c switch handles. These pointers are all freed if failing to obtain any of them; therefore, pointers in `port` become stale. The stale pointers eventually cause use-after-free or double free in later code paths. Zeroing out all pointer fields after freeing to eliminate these stale pointers.

Which versions are affected by CVE-2022-50642?

How do I fix CVE-2022-50642?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2022-50642 being exploited?

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

Sources

Also known as DEBIAN-CVE-2022-50642, GHSA-hcmx-x6wc-rr97, ROOT-OS-DEBIAN-11-CVE-2022-50642, UBUNTU-CVE-2022-50642.

Is CVE-2022-50642 in your software?

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

Check your SBOMs for free