platform/chrome: cros_ec_typec: zero out stale pointers
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.15.86, 6.0.16, 6.1.2
- CVEs
- CVE-2022-50642
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 03:38 UTC · Revision 1
Source evidence
platform/chrome: cros_ec_typec: zero out stale pointers
core-osv · Original sourcePublished 9 Dec 2025, 00:00 UTC
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.
osv:CVE-2022-50642
Kernel
Fixed versions: 5.15.86, 6.0.16, 6.1.2
Complete source record
{
"id": "7aba08ac49569b4dffb5debdea6d331b6fa281db9adbcaf6af436122ec533df4",
"url": "https://osv.dev/vulnerability/CVE-2022-50642",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "platform/chrome: cros_ec_typec: zero out stale pointers",
"summary": "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.",
"evidence": "osv:CVE-2022-50642",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.15.86",
"evidence": "/affected/1/ranges"
},
{
"value": "6.0.16",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.2",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2022-50642",
"aliases": [
"CVE-2022-50642"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "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"
}
},
{
"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"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50642.json"
}
}
],
"modified": "2026-10-28T02:30:32.734080950Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/0ceadb5a3e45f1b81cf54bd496b40a5e50b6bd40",
"https://git.kernel.org/stable/c/6613f36a2fa5c69e528bccba8b3d831f759dad2f",
"https://git.kernel.org/stable/c/9a8aadcf0b459c1257b9477fd6402e1d5952ae07",
"https://git.kernel.org/stable/c/b610758bb3e0674644c1255cdafc2f46b7e05ff9",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50642.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-50642",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50642.json"
}
},
"related_cves": [
{
"value": "CVE-2022-50642",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 500068,
"published_at": "2025-12-09T00:00:16.49+00:00"
}