From mboxrd@z Thu Jan 1 00:00:00 1970 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 5877320B20 for ; Tue, 26 Mar 2024 17:50:18 +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=1711475418; cv=none; b=locYjlhSWkXYE00PuOJ6Sllp2AUEk17f3Y6BYgs3JcWFn8IKSITTMa1OdDE/i+9qIBKj8tmFVXpg/8/XEMqs0Zmz9oPHLMBTgdYTs/e10yA5TNOCxbh9/MDulzisNR4HM7ikX7Li6gHASs5TBCwTKVHGJbxtCmnZiAmFctNtK4k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711475418; c=relaxed/simple; bh=dYQuEgf/y2ZX5GMC2xyK/I+FRLR6a3Rzv1UaPtbrZCM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MsP1VAAHj0EtSWdGbOib9vCmRg8R7/HYIylfgYQNWmBs6IG4o8fPpUo5O6WvUwQzyT+tRC4z+5mDD8ijDKuh76EoDa2LxOruDXrNJ8ozGmL6jPiCYgrTmAw2nSYv8R0ObHC4FP322wn3doiSIMme4yU+TJcak7sNmIUl5AbXci4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fV8Y0Je2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fV8Y0Je2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F48FC43390; Tue, 26 Mar 2024 17:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711475418; bh=dYQuEgf/y2ZX5GMC2xyK/I+FRLR6a3Rzv1UaPtbrZCM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fV8Y0Je2AUWoQkw9RtaY2S7bSdLekkwtJ3VFDzOaFUoORv2MJbmQOFEyMNu9M1THx +aYeFQ1d3BsXnE2KKOAxA0qPg/3kLlaVX8wRtnbEptyVUNgRKJzd+93S15UWORK/fI 1Ir8xjwxZ9a09/IjYxNdgsU4iHSudNz10FimLftN/iLazvX81GmAdFuvTQNWI7IanG uKvdu3zOrLwMoBzVAMQabgSbvthoPgR4zFo7syimMQkiVahFsX5f3n0Hfa7zEK2avk T5V2wU2T9PIq/56Sz+1sshH08+GESFfEdd56ic24oEyxuZOjKezEDZsI5UQZPqNh0z FLCzyLJyEeDwQ== From: Lee Jones To: linux-cve-announce@vger.kernel.org Cc: Lee Jones Subject: CVE-2023-52625: drm/amd/display: Refactor DMCUB enter/exit idle interface Date: Tue, 26 Mar 2024 17:50:09 +0000 Message-ID: <20240326175007.1388794-11-lee@kernel.org> X-Mailer: git-send-email 2.44.0.396.g6e790dbe36-goog 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=2908; i=lee@kernel.org; h=from:subject; bh=dYQuEgf/y2ZX5GMC2xyK/I+FRLR6a3Rzv1UaPtbrZCM=; b=owEBbQKS/ZANAwAKAVGvii+H/HdhAcsmYgBmAwrQ7Ra9/z7IBROjG02wb/G/kuYqsFpwbmJL8 GyPx7PmyMiJAjMEAAEKAB0WIQR2tsk1o74gmpTwh0hRr4ovh/x3YQUCZgMK0AAKCRBRr4ovh/x3 YZSdD/9uwipBJFi+vIdSrsgc6ITGqChyQPSgnhFHEQeFiHTDaK92B1YuJvJ1sr3TQDePBxqJ7E8 Wqjrso+Z4Hnt6baYqUnnlKYmok5cgbLBpUU305c06GYcPbtyF6sZSMxMHn73uRMVlJvanTlwI+Y dp+3PC4/6+XQQIj3epWrZ0gCxHszo9RaO7wj54j3kcqd9f/Wt+VS6nAsyQyRbwgq9r4hS4O54C7 2I2H0yi7/RSezTyUr+AkpoS4vP5oFAvfuv06TTFEAavw/R52QsIbGuYOmpXHphkwyFOI5Qxf7OL /mV/AbaIoQ++7LPLLI2xrBbf6LS0F1oO9BwJaAZXBvyncutKNBnN4FpB0oLtGJ4tGTQc/ygI07S nhjIRZl+P34n5SVWPoMtrHdUt093xAM51aSqMHCmSTCg/d7NnlqFs1dWtoJ78Gj1aPm+b3eYUMM yzTq3EfJfyeniHvZgIGeKjVf+QvhyHIxL8rO8CibEZgkehMuOmCI1FTn/UYsXPjFbNq8EYJKQmf UCpzxV+PjbKIQsWRGvxjJWI36Qr2DfbTP7fTSAg6kBMUZ0ymVXRPdKLgpDQFm8jITda4YhglsDD K+hVd7WD5jtAcBw0434jmrXQ4oz2FnpInxgcEVR7oSJR1XDqSg+kmh/9H/MlaeTeiQXUay5H7GQ LzaTQ2Wlg5Tqgnw== X-Developer-Key: i=lee@kernel.org; a=openpgp; fpr=76B6C935A3BE209A94F0874851AF8A2F87FC7761 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: Refactor DMCUB enter/exit idle interface [Why] We can hang in place trying to send commands when the DMCUB isn't powered on. [How] We need to exit out of the idle state prior to sending a command, but the process that performs the exit also invokes a command itself. Fixing this issue involves the following: 1. Using a software state to track whether or not we need to start the process to exit idle or notify idle. It's possible for the hardware to have exited an idle state without driver knowledge, but entering one is always restricted to a driver allow - which makes the SW state vs HW state mismatch issue purely one of optimization, which should seldomly be hit, if at all. 2. Refactor any instances of exit/notify idle to use a single wrapper that maintains this SW state. This works simialr to dc_allow_idle_optimizations, but works at the DMCUB level and makes sure the state is marked prior to any notify/exit idle so we don't enter an infinite loop. 3. Make sure we exit out of idle prior to sending any commands or waiting for DMCUB idle. This patch takes care of 1/2. A future patch will take care of wrapping DMCUB command submission with calls to this new interface. The Linux kernel CVE team has assigned CVE-2023-52625 to this issue. Affected and fixed versions =========================== Fixed in 6.7.3 with commit 820c3870c491 Fixed in 6.8 with commit 8e57c06bf4b0 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-2023-52625 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/amd/display/amdgpu_dm/amdgpu_dm.c drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.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/820c3870c491946a78950cdf961bf40e28c1025f https://git.kernel.org/stable/c/8e57c06bf4b0f51a4d6958e15e1a99c9520d00fa