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 3DEC935959 for ; Fri, 27 Dec 2024 15:00:49 +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=1735311650; cv=none; b=nTGOJpa53BU2JbF2Awrdv/OZPaU4pj5w6k8+gOqWZXR1WwKDz9aAsTHsMNZTzzaFY7hi97GaX7n7FiyYg4QI2J8+zzcMiMUthL52UujaxyuhzvbS+aMMb0PX2a9Mls/mGielV+phxVha15x1FUhvjUbKQ6jERNUFIk4jrF3tYOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735311650; c=relaxed/simple; bh=lj7sm0HGVCjCtgZaVof7RNg9WsC+rqm3OsrZ4q43Bzo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DIROjilZEx4iwsAF5OtSUCGwKZjQgubgea2mpyd2GGuq+EZCifBrUrxauF5cMQ2hn3EhIqB5S6Cl1P5lFOMxO1u3CmtH9h/nhkTJd5Je6WPf4DwV6LRhLVckXsELU1iQ2JoCzaVxBsoEzxcD3Aj/CZdm+SS8ZocTS7hIrEWWWgM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=K3odFJ4s; 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="K3odFJ4s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C357C4CED0; Fri, 27 Dec 2024 15:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735311649; bh=lj7sm0HGVCjCtgZaVof7RNg9WsC+rqm3OsrZ4q43Bzo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=K3odFJ4sMIs4eJnbBviWZTGQNsw0uMKKBzbN9bmtiTAR6F7o2vLJszCtGhbFPnSd6 KUGygrVfHBJ8DL9tT8c88NrbqGrdB580RrGeDFCfkjfavN8huX2S9475PFZVkJEqa3 bYmbJvRa1MLdX0q9m0qWWLpV+nxypel0TU36d0Fs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56616: drm/dp_mst: Fix MST sideband message body length check Date: Fri, 27 Dec 2024 15:51:23 +0100 Message-ID: <2024122708-CVE-2024-56616-ae89@gregkh> X-Mailer: git-send-email 2.47.1 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=3137; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lj7sm0HGVCjCtgZaVof7RNg9WsC+rqm3OsrZ4q43Bzo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5++6ssDdier4w8fjB4F/ydqf9k7w69k3IfOh9dEHlx sudE6ZVdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBElooyzHd59XMv65qYPxPD zu3lCFr7PVxfs5lhnvaEFYErnlc1xch6zcksf59lJehwHQA= 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: drm/dp_mst: Fix MST sideband message body length check Fix the MST sideband message body length check, which must be at least 1 byte accounting for the message body CRC (aka message data CRC) at the end of the message. This fixes a case where an MST branch device returns a header with a correct header CRC (indicating a correctly received body length), with the body length being incorrectly set to 0. This will later lead to a memory corruption in drm_dp_sideband_append_payload() and the following errors in dmesg: UBSAN: array-index-out-of-bounds in drivers/gpu/drm/display/drm_dp_mst_topology.c:786:25 index -1 is out of range for type 'u8 [48]' Call Trace: drm_dp_sideband_append_payload+0x33d/0x350 [drm_display_helper] drm_dp_get_one_sb_msg+0x3ce/0x5f0 [drm_display_helper] drm_dp_mst_hpd_irq_handle_event+0xc8/0x1580 [drm_display_helper] memcpy: detected field-spanning write (size 18446744073709551615) of single field "&msg->msg[msg->curlen]" at drivers/gpu/drm/display/drm_dp_mst_topology.c:791 (size 256) Call Trace: drm_dp_sideband_append_payload+0x324/0x350 [drm_display_helper] drm_dp_get_one_sb_msg+0x3ce/0x5f0 [drm_display_helper] drm_dp_mst_hpd_irq_handle_event+0xc8/0x1580 [drm_display_helper] The Linux kernel CVE team has assigned CVE-2024-56616 to this issue. Affected and fixed versions =========================== Fixed in 6.1.120 with commit 780fa184d4dc38ad6c4fded345ab8f9be7a63e96 Fixed in 6.6.66 with commit c58947a8d4a500902597ee1dbadf0518d7ff8801 Fixed in 6.12.5 with commit 1fc1f32c4a3421b9d803f18ec3ef49db2fb5d5ef Fixed in 6.13-rc2 with commit bd2fccac61b40eaf08d9546acc9fef958bfe4763 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-56616 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/gpu/drm/display/drm_dp_mst_topology.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/780fa184d4dc38ad6c4fded345ab8f9be7a63e96 https://git.kernel.org/stable/c/c58947a8d4a500902597ee1dbadf0518d7ff8801 https://git.kernel.org/stable/c/1fc1f32c4a3421b9d803f18ec3ef49db2fb5d5ef https://git.kernel.org/stable/c/bd2fccac61b40eaf08d9546acc9fef958bfe4763