{"id":"CVE-2022-50642","summary":"platform/chrome: cros_ec_typec: zero out stale pointers","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/chrome: cros_ec_typec: zero out stale pointers\n\n`cros_typec_get_switch_handles` allocates four pointers when obtaining\ntype-c switch handles. These pointers are all freed if failing to obtain\nany of them; therefore, pointers in `port` become stale. The stale\npointers eventually cause use-after-free or double free in later code\npaths. Zeroing out all pointer fields after freeing to eliminate these\nstale pointers.","modified":"2026-04-02T08:28:40.733128Z","published":"2025-12-09T00:00:16.490Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50642.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0ceadb5a3e45f1b81cf54bd496b40a5e50b6bd40"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6613f36a2fa5c69e528bccba8b3d831f759dad2f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9a8aadcf0b459c1257b9477fd6402e1d5952ae07"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b610758bb3e0674644c1255cdafc2f46b7e05ff9"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50642.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50642"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f28adb41dab4a2795fd959750df57adffd2bb0be"},{"fixed":"0ceadb5a3e45f1b81cf54bd496b40a5e50b6bd40"},{"fixed":"b610758bb3e0674644c1255cdafc2f46b7e05ff9"},{"fixed":"6613f36a2fa5c69e528bccba8b3d831f759dad2f"},{"fixed":"9a8aadcf0b459c1257b9477fd6402e1d5952ae07"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50642.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.9.0"},{"fixed":"5.15.86"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.0.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50642.json"}}],"schema_version":"1.7.5"}