platform/chrome: cros_ec_typec: zero out stale pointers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's cros_ec_typec code can leave stale pointers after a failure to obtain Type-C switch handles. Later code paths can use or free those pointers, causing a use-after-free or double free. The input does not specify attacker access, authentication requirements, or user interaction.
Engineers running Linux kernels with cros_ec_typec should check their versions against the vendor advisory; affected versions are not specified.