All reports
Medium

kernel: platform/chrome: cros_ec_typec: zero out stale pointers

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2022-50642

Probability of exploitation in the next 30 days: 0.21%

FIRST EPSS · 2026-11-20

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.

A use-after-free vulnerability exists in the Chrome EC Type-C driver in the Linux kernel. When cros_typec_get_switch_handles() fails to obtain switch handles, it frees allocated pointers but doesn't zero them out. These stale pointers can later be dereferenced, causing use-after-free or double-free conditions.