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 9AF13199242 for ; Tue, 16 Jul 2024 11:47:54 +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=1721130474; cv=none; b=lhOS55CcJ9zE10UE4kM0jUrLLrbbKnCyVjLg/QHn4KdF2RgGHrtuW7YVrVKnjoq5sSzMK5vdXCRCMNmeqDgawS9i3BsnIxuivPwp1oi9G+GUVasfXy7vJpV9fDgkz9PQw82s4JaQqS4TdmyqXA8rGIberMzd39Q9wYV+2kiUU9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721130474; c=relaxed/simple; bh=7Gn/O5eSdzxfWk94QT/urC8W85ql3cNNjwUjm3U+vbg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IranzZPFuX4NVqfZ5aS8k8NNXpv2Gugsw06REiXXbsCwUW8qHgVq5byFBG5vzrxfE8WC8CWZmQekvH3rrCrmlq1dM5jAOsjPED4lMHcdDbSB8QOHtQNdgHCZrr3jTiqFg3V9ETiZc0taELOuFDf/5MgJ4I6AJmK+DeNe4KWgUBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CwbLh9qN; 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="CwbLh9qN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 216E7C116B1; Tue, 16 Jul 2024 11:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721130474; bh=7Gn/O5eSdzxfWk94QT/urC8W85ql3cNNjwUjm3U+vbg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=CwbLh9qNR6flTQYt/9uA2yPuJYyGcABNsd8rSYiwCrNa947CxZ7mIFaFwcKpMbn8u 1lMnlH/iHz6QKCTkxWdTuxRI4UzgsuA4n9SWFfOAgH+B1FfkbkQJHHaw7UhGyFX6PJ qFusA5k7NyczvxADs7ES0BSQV8LcHN0POeQjkk4g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48826: drm/vc4: Fix deadlock on DSI device attach error Date: Tue, 16 Jul 2024 13:46:18 +0200 Message-ID: <2024071651-CVE-2022-48826-9956@gregkh> X-Mailer: git-send-email 2.45.2 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=3918; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=7Gn/O5eSdzxfWk94QT/urC8W85ql3cNNjwUjm3U+vbg=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnTYvOf35iceK75eGRyisqKo4n2Dzvble6deHpG88DXk rv8Ee/jOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiApMZZjH9fnrC4zk349fE gPUz61bXfjo6349hnmng90lufSGrPu6vKH2sfN+ne/7/SQA= 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/vc4: Fix deadlock on DSI device attach error DSI device attach to DSI host will be done with host device's lock held. Un-registering host in "device attach" error path (ex: probe retry) will result in deadlock with below call trace and non operational DSI display. Startup Call trace: [ 35.043036] rt_mutex_slowlock.constprop.21+0x184/0x1b8 [ 35.043048] mutex_lock_nested+0x7c/0xc8 [ 35.043060] device_del+0x4c/0x3e8 [ 35.043075] device_unregister+0x20/0x40 [ 35.043082] mipi_dsi_remove_device_fn+0x18/0x28 [ 35.043093] device_for_each_child+0x68/0xb0 [ 35.043105] mipi_dsi_host_unregister+0x40/0x90 [ 35.043115] vc4_dsi_host_attach+0xf0/0x120 [vc4] [ 35.043199] mipi_dsi_attach+0x30/0x48 [ 35.043209] tc358762_probe+0x128/0x164 [tc358762] [ 35.043225] mipi_dsi_drv_probe+0x28/0x38 [ 35.043234] really_probe+0xc0/0x318 [ 35.043244] __driver_probe_device+0x80/0xe8 [ 35.043254] driver_probe_device+0xb8/0x118 [ 35.043263] __device_attach_driver+0x98/0xe8 [ 35.043273] bus_for_each_drv+0x84/0xd8 [ 35.043281] __device_attach+0xf0/0x150 [ 35.043290] device_initial_probe+0x1c/0x28 [ 35.043300] bus_probe_device+0xa4/0xb0 [ 35.043308] deferred_probe_work_func+0xa0/0xe0 [ 35.043318] process_one_work+0x254/0x700 [ 35.043330] worker_thread+0x4c/0x448 [ 35.043339] kthread+0x19c/0x1a8 [ 35.043348] ret_from_fork+0x10/0x20 Shutdown Call trace: [ 365.565417] Call trace: [ 365.565423] __switch_to+0x148/0x200 [ 365.565452] __schedule+0x340/0x9c8 [ 365.565467] schedule+0x48/0x110 [ 365.565479] schedule_timeout+0x3b0/0x448 [ 365.565496] wait_for_completion+0xac/0x138 [ 365.565509] __flush_work+0x218/0x4e0 [ 365.565523] flush_work+0x1c/0x28 [ 365.565536] wait_for_device_probe+0x68/0x158 [ 365.565550] device_shutdown+0x24/0x348 [ 365.565561] kernel_restart_prepare+0x40/0x50 [ 365.565578] kernel_restart+0x20/0x70 [ 365.565591] __do_sys_reboot+0x10c/0x220 [ 365.565605] __arm64_sys_reboot+0x2c/0x38 [ 365.565619] invoke_syscall+0x4c/0x110 [ 365.565634] el0_svc_common.constprop.3+0xfc/0x120 [ 365.565648] do_el0_svc+0x2c/0x90 [ 365.565661] el0_svc+0x4c/0xf0 [ 365.565671] el0t_64_sync_handler+0x90/0xb8 [ 365.565682] el0t_64_sync+0x180/0x184 The Linux kernel CVE team has assigned CVE-2022-48826 to this issue. Affected and fixed versions =========================== Fixed in 5.15.24 with commit 770d1ba9a820 Fixed in 5.16.10 with commit dddd832f3509 Fixed in 5.17 with commit 0a3d12ab5097 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-48826 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/vc4/vc4_dsi.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/770d1ba9a8201ce9bee0946eb03746449b6f3b80 https://git.kernel.org/stable/c/dddd832f35096fbc5004e3a7e58fb4d2cefb8deb https://git.kernel.org/stable/c/0a3d12ab5097b1d045e693412e6b366b7e82031b