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 38C3C5C613 for ; Fri, 17 May 2024 14:27:45 +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=1715956065; cv=none; b=XWRWyWmi0+bHZYXBnFNAllGYsOCHMvnwu4camOsUEFxVbUk+jePXhaeLtSoAlFs1odmuBgVrP9KvDk9CAtu9434yblLO15RO+4L8ht4awr7J+O6WFbLQA++ov4ij2svwonNJMyT0TDiVoRRmUjgHlCSqu/bET9EN8vL/mDPIVuU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715956065; c=relaxed/simple; bh=s4VAEmGnd6/vlY2L9zeEMDjrAdOp6G20XVRLW2AhHvo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HZhcwaMPSJ7tkuivmEK5TXr+VAgHCKnceaiF4+NbYVkXKpMPrvbCiynNBziOTNw5sL0ziQZfgScF/ycsFU8mPbQse9lFqhOSWkNZQN4/Qt8kUsNY0u6JmANVK1HX26sBH4A27fxS79RkyyJ2103rOMB+RqV4J+N6tqvNrdjBWgM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rkukctsX; 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="rkukctsX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0E33C2BD10; Fri, 17 May 2024 14:27:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715956065; bh=s4VAEmGnd6/vlY2L9zeEMDjrAdOp6G20XVRLW2AhHvo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=rkukctsXRDaxrRNqf4UaOQMAiMe7mIkefO0Wp3gKNsCf7nuVy0g4nsK5NxWCV1pVx F39ZGgLImAuJ2OAejRiVQ2bk/eLOi7GO4ITsYeCpDem1l3ya1WyQrcKoKzYqA+T8k8 Ad35R3IVvwN+JxKQBtopETZxFjKV3T/b60i0/78o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52678: drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c Date: Fri, 17 May 2024 16:26:51 +0200 Message-ID: <2024051750-CVE-2023-52678-32b5@gregkh> X-Mailer: git-send-email 2.45.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=2517; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=s4VAEmGnd6/vlY2L9zeEMDjrAdOp6G20XVRLW2AhHvo=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnumVob9qhMPGgXuWbnrjVcnx10Xr9VWv39xbk9Z8qdF Xe5XL1W0BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATCctmmCvLk2oqfuxFaOL6 6UI2+1iPdCj4ajLMZrGqyHAsevk/4POntlPnkp05Q/ctBwA= 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/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c Before using list_first_entry, make sure to check that list is not empty, if list is empty return -ENODATA. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1347 kfd_create_indirect_link_prop() warn: can 'gpu_link' even be NULL? drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1428 kfd_add_peer_prop() warn: can 'iolink1' even be NULL? drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1433 kfd_add_peer_prop() warn: can 'iolink2' even be NULL? The Linux kernel CVE team has assigned CVE-2023-52678 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 0f28cca87e9a and fixed in 6.1.75 with commit 4525525cb716 Issue introduced in 6.0 with commit 0f28cca87e9a and fixed in 6.6.14 with commit 5024cce888e1 Issue introduced in 6.0 with commit 0f28cca87e9a and fixed in 6.7.2 with commit 4ac4e023ed7a Issue introduced in 6.0 with commit 0f28cca87e9a and fixed in 6.8 with commit 499839eca34a 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-52678 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/amdkfd/kfd_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/4525525cb7161d08f95d0e47025323dd10214313 https://git.kernel.org/stable/c/5024cce888e11e5688f77df81db9e14828495d64 https://git.kernel.org/stable/c/4ac4e023ed7ab1c7c67d2d12b7b6198fcd099e5c https://git.kernel.org/stable/c/499839eca34ad62d43025ec0b46b80e77065f6d8