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 AE3CF84D0B for ; Wed, 1 May 2024 12:57:46 +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=1714568266; cv=none; b=f7ucw+aDM3mBLbfvSm7YzhsrA8d1mqIAa+uLLoWUV8S2dDO1EFBE/P7CR4sq/nvhXCJEJDRXu+xhdhkZJ9MdbJAL+SDkdVtWgQFu8hck4cw+68H0oPNXyvE4cf6I2eMqqlV+kg87pqmTA6oFkKCY38aMTe0+pntEvDeHqYlm7i0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568266; c=relaxed/simple; bh=DaR+eKbC4CFONsqGFbO7RddZE43asK3HkO9narNn8HM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ju/GTwNEJoMejiXzOYG8bAzd7Wc/2Pp4/1qFjqjW7633YFNvjrcrFCFS3A4x/WfBMBsa6JLZ/udAbISLmPFSAchtWec+mdChB2XIeZDz3TMoGz0nKnjaXZg/TST0q7Edu7P1oI15SD1sx/0EfkNz7UbcyRa6eUnG+8zQLwZF4+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FgZWxLru; 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="FgZWxLru" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFCBFC113CC; Wed, 1 May 2024 12:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714568266; bh=DaR+eKbC4CFONsqGFbO7RddZE43asK3HkO9narNn8HM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=FgZWxLru1liymfXyyjPfoV3UacwZhPDSak9gX04i8inCphaEX2f1ubhlp8cqd36gv S30a0Z/WDAQc/RWRf5bTF/r2D+g1IrHTeExxAK62Hz3yyL0+u0CYIhf/NlTYAAjSvV uiOyV6eGs+wxRU9+CFQmDwBqhVCCrz9FEjgo1tdk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27041: drm/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini() Date: Wed, 1 May 2024 14:57:26 +0200 Message-ID: <2024050112-CVE-2024-27041-7bf4@gregkh> X-Mailer: git-send-email 2.44.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=2569; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DaR+eKbC4CFONsqGFbO7RddZE43asK3HkO9narNn8HM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlGNhrruhK/ZITcufCQOVRl497ni8uDLhY/WPfmtNIbx +2aTYevd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEzlkxzA/nfXNMf87nw1HG 2hU3pvXVmXKu+siw4KzKkTlTbI8VLm35vVoqczl/JJdfAAA= 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/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini() Since 'adev->dm.dc' in amdgpu_dm_fini() might turn out to be NULL before the call to dc_enable_dmub_notifications(), check beforehand to ensure there will not be a possible NULL-ptr-deref there. Also, since commit 1e88eb1b2c25 ("drm/amd/display: Drop CONFIG_DRM_AMD_DC_HDCP") there are two separate checks for NULL in 'adev->dm.dc' before dc_deinit_callbacks() and dc_dmub_srv_destroy(). Clean up by combining them all under one 'if'. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. The Linux kernel CVE team has assigned CVE-2024-27041 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 81927e2808be and fixed in 6.6.23 with commit e040f1fbe9ab Issue introduced in 5.14 with commit 81927e2808be and fixed in 6.7.11 with commit ca2eb375db76 Issue introduced in 5.14 with commit 81927e2808be and fixed in 6.8.2 with commit 1c62697e4086 Issue introduced in 5.14 with commit 81927e2808be and fixed in 6.9-rc1 with commit 2a3cfb9a24a2 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-27041 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 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/e040f1fbe9abae91b12b074cfc3bbb5367b79811 https://git.kernel.org/stable/c/ca2eb375db76fd50f31afdd67d6ca4f833254957 https://git.kernel.org/stable/c/1c62697e4086de988b31124fb8c79c244ea05f2b https://git.kernel.org/stable/c/2a3cfb9a24a28da9cc13d2c525a76548865e182c