Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9A758BEC for ; Tue, 9 Dec 2025 00:02:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765238526; cv=none; b=I/0IWfnMUJMkQ/oWWViHYGSW0nGkKXoGz5aDvDEGR72Xg6RfIbw/dY+m5R1wo6ow68LFPNn6j0O3+QBKWzxkTY2NooGp+IvTIVvDHNuPoStX/UfIs7jBrZRKA9PAk64nDAI4GN2oS2a3govgEErxbNL/XAiKl/u4gTrV4148auY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765238526; c=relaxed/simple; bh=vkwy162XLY5glsIXQJqM6gAske2zedpwrG1nBUASUhs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XwvX3/yTnfzDMI98aA09W69w/6vCei68I/abDH14eYKtgDfGBdJmbOTmlqE3cndi4VvymyuOYkPMZSRDhYRNYGUHdgNfRkGKXLrusY+ClXbk+uTb0vONmgBoM4UURO/y4NK/8VeceJX0aRzwVA1ueHsVjuZ1WCVMQEPrka85Z7Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=R/m0V3WA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="R/m0V3WA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94A54C4CEF1; Tue, 9 Dec 2025 00:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765238523; bh=vkwy162XLY5glsIXQJqM6gAske2zedpwrG1nBUASUhs=; h=From:To:Cc:Subject:Date:Reply-To:From; b=R/m0V3WAKLkbNH6hbXvDUa5EfuV7Md/hYFCxMRnrFuCA1IRzbxaAnoXheVYYu7CIY k00ShkHPqtMlorLPAvPnVDI9lQbopIdhHXkn/cW/dakMfEovOl2TCMM++of9xp5y6c iBKCMAPfoEzM1RsEvhUrYag7kaEHwYN5iY7PXsFs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50642: platform/chrome: cros_ec_typec: zero out stale pointers Date: Tue, 9 Dec 2025 09:01:43 +0900 Message-ID: <2025120936-CVE-2022-50642-6975@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2601; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=S002WIqeZ/cMwF+axzK2jajto1lonxYBkNdsZkUS+Co=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnmaQ+2vbF78uiV/q7bMctWf0l9bH4s+OC9zLTe+YkvA 5rus4rc74hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJRAozzM/MizneK373eHXT TYaHfxIE/h/9sp9hwSJf3XNi905lGsxKzZ4Ssbb1QlCTNAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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. The Linux kernel CVE team has assigned CVE-2022-50642 to this issue. Affected and fixed versions =========================== Issue introduced in 5.9 with commit f28adb41dab4a2795fd959750df57adffd2bb0be and fixed in 5.15.86 with commit 0ceadb5a3e45f1b81cf54bd496b40a5e50b6bd40 Issue introduced in 5.9 with commit f28adb41dab4a2795fd959750df57adffd2bb0be and fixed in 6.0.16 with commit b610758bb3e0674644c1255cdafc2f46b7e05ff9 Issue introduced in 5.9 with commit f28adb41dab4a2795fd959750df57adffd2bb0be and fixed in 6.1.2 with commit 6613f36a2fa5c69e528bccba8b3d831f759dad2f Issue introduced in 5.9 with commit f28adb41dab4a2795fd959750df57adffd2bb0be and fixed in 6.2 with commit 9a8aadcf0b459c1257b9477fd6402e1d5952ae07 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2022-50642 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/platform/chrome/cros_ec_typec.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/0ceadb5a3e45f1b81cf54bd496b40a5e50b6bd40 https://git.kernel.org/stable/c/b610758bb3e0674644c1255cdafc2f46b7e05ff9 https://git.kernel.org/stable/c/6613f36a2fa5c69e528bccba8b3d831f759dad2f https://git.kernel.org/stable/c/9a8aadcf0b459c1257b9477fd6402e1d5952ae07