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 7FFB338B for ; Tue, 19 Nov 2024 01:33:40 +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=1731980020; cv=none; b=oEhyU18xbouAwDSMgcZ8/mRc3AkgOwSk98MZjcOWdvJAXtwf6ASxbhzZ9hmiChCk1NFfs0xbeBxp/587pjRrEEjXelRmR1aw7ZPHTjAhV/cZrnf2zNqwyCiMiprzCaUSfAbINtMbdMqLk0e17WIM8xSTdbW+gNTpF08PxsMURLg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731980020; c=relaxed/simple; bh=x+B7CKKuqeacxMbLq2MFfM47X9Xpu1ziiaBptTKCgLI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YQgnWrofGJnqdX59vkieI6fmFbaoBwB6EV2aybkW+m0SmuicA2R8o470moNBm2devabijCEOW8EB1xblNeQ+ypsBtPjJWmITx5VMSf7bphG86vXPUBfjARFOlDESLF0s/0RVQsYxs2/1VJ4K9XGpYzjO8PqSje4VIGyvp1JOEIc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=W5rnEcQ6; 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="W5rnEcQ6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFFF1C4CECF; Tue, 19 Nov 2024 01:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731980020; bh=x+B7CKKuqeacxMbLq2MFfM47X9Xpu1ziiaBptTKCgLI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=W5rnEcQ6HqRGkqwgwzy5fgQDBCnYKBkwLLp3ciWAorA4TEEWE1490iNfcN8dK1KGh 9acqdVFzfDPnF4FE1T0rUUCCY99nbzUT91XXJVw9EEMaAbWRxRcyxTazq/Hc0jZz6P xYY7CNvoq/q+pVVh5vcMWuD5U+AVUiqFGDJy7/70= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50268: usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd() Date: Tue, 19 Nov 2024 02:32:23 +0100 Message-ID: <2024111925-CVE-2024-50268-9b55@gregkh> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2783; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=x+B7CKKuqeacxMbLq2MFfM47X9Xpu1ziiaBptTKCgLI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOnWr1ZuWB/C+s4lJ+Ive1rX6gN3P9QETzc7WdjetmXJG vfVXPODOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiZ4IZ5lcGXa7g39rG5Nqh vuGnC/+TvwE57AwLtmveD1i4kt2uJ/1z2tEP6dstukJ/AQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd() The "*cmd" variable can be controlled by the user via debugfs. That means "new_cam" can be as high as 255 while the size of the uc->updated[] array is UCSI_MAX_ALTMODES (30). The call tree is: ucsi_cmd() // val comes from simple_attr_write_xsigned() -> ucsi_send_command() -> ucsi_send_command_common() -> ucsi_run_command() // calls ucsi->ops->sync_control() -> ucsi_ccg_sync_control() The Linux kernel CVE team has assigned CVE-2024-50268 to this issue. Affected and fixed versions =========================== Issue introduced in 5.6 with commit 170a6726d0e2 and fixed in 5.10.230 with commit d76923164705 Issue introduced in 5.6 with commit 170a6726d0e2 and fixed in 5.15.172 with commit 8f47984b35f3 Issue introduced in 5.6 with commit 170a6726d0e2 and fixed in 6.1.117 with commit 604314ecd682 Issue introduced in 5.6 with commit 170a6726d0e2 and fixed in 6.6.61 with commit 69e19774f15e Issue introduced in 5.6 with commit 170a6726d0e2 and fixed in 6.11.8 with commit 3a2ba841659a Issue introduced in 5.6 with commit 170a6726d0e2 and fixed in 6.12 with commit 7dd08a0b4193 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-2024-50268 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/usb/typec/ucsi/ucsi_ccg.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/d76923164705821aa1b01b8d9d1741f20c654ab4 https://git.kernel.org/stable/c/8f47984b35f3be0cfc652c2ca358d5768ea3456b https://git.kernel.org/stable/c/604314ecd682913925980dc955caea2d036eab5f https://git.kernel.org/stable/c/69e19774f15e12dda6c6c58001d059e30895009b https://git.kernel.org/stable/c/3a2ba841659a0f15102585120dea75d8d5209616 https://git.kernel.org/stable/c/7dd08a0b4193087976db6b3ee7807de7e8316f96