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 4365484D0B for ; Wed, 1 May 2024 12:57: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=1714568269; cv=none; b=HK2eVw9U+EtVjtivU3UH4J2ZTeXgmt0kqj0+t6fHnTLtK6/QeUn/X5BfH6aIAZcLvBdt5xXjbpP+YmnDdpXS/XVHovWUWGda8/3bZ9HIQ2LDUw4utm4km8DTo9k7jn8qIAZ2FXC9q+ssnh4nRKeZpzEjYzpPvgvFd3Uqzghior8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568269; c=relaxed/simple; bh=paT3RZjEtDJ1fcuWYKDpfYVNPmglqIoQKwO1G+Lpt1M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sB52Ixbvy/Jn2MGW3Am9TN6XFLKXKTYcZyzpHi8ohVv+wrMmgdddUAfRCMs9ila204q6W9q38tymsKvy5VBPZLTmiIgVMGt6sVKW9BjJ3ubydAkRuDpACkaKXU4YgTER15LLLkXnrcvj0oZvtzAR5SuUI+ST2Coxt9KFRM/mNNM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tFOI2nb8; 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="tFOI2nb8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBC37C113CC; Wed, 1 May 2024 12:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714568269; bh=paT3RZjEtDJ1fcuWYKDpfYVNPmglqIoQKwO1G+Lpt1M=; h=From:To:Cc:Subject:Date:Reply-to:From; b=tFOI2nb8g/om7BP3cJmZrIHGJG7sSQvqiTfeyIMNaxJqcEPtm5ej0p1IBiJ3bN6E6 jfo5gIaJ6Ee/XD288Mm/iCNWlhpVgHo3oKwYwrofDCC58XOqkf6NTOVGgzSD015+Z8 3q9uAFOngTWj+IDEx9+36LOzYEexhLzTN/zTHkmQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27042: drm/amdgpu: Fix potential out-of-bounds access in 'amdgpu_discovery_reg_base_init()' Date: Wed, 1 May 2024 14:57:27 +0200 Message-ID: <2024050113-CVE-2024-27042-e812@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=2552; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=paT3RZjEtDJ1fcuWYKDpfYVNPmglqIoQKwO1G+Lpt1M=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlGNpr6b/feXXLj23p5zy6rz+0SlVb/2j4cn7jXaMJxl 83LZ3HadsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBETq5imO8/MTnFQNj5yP8e Rz6tvKQHWvZ3HRnmKUlrvb1zVf/aid/+voYz9NiX3PWfBQA= 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/amdgpu: Fix potential out-of-bounds access in 'amdgpu_discovery_reg_base_init()' The issue arises when the array 'adev->vcn.vcn_config' is accessed before checking if the index 'adev->vcn.num_vcn_inst' is within the bounds of the array. The fix involves moving the bounds check before the array access. This ensures that 'adev->vcn.num_vcn_inst' is within the bounds of the array before it is used as an index. Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1289 amdgpu_discovery_reg_base_init() error: testing array offset 'adev->vcn.num_vcn_inst' after use. The Linux kernel CVE team has assigned CVE-2024-27042 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit a0ccc717c4ab and fixed in 6.6.23 with commit 8f3e68c6a3ff Issue introduced in 5.19 with commit a0ccc717c4ab and fixed in 6.7.11 with commit b33d4af102b9 Issue introduced in 5.19 with commit a0ccc717c4ab and fixed in 6.8.2 with commit 8db10cee51e3 Issue introduced in 5.19 with commit a0ccc717c4ab and fixed in 6.9-rc1 with commit cdb637d33957 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-27042 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/amdgpu/amdgpu_discovery.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/8f3e68c6a3fff53c2240762a47a0045d89371775 https://git.kernel.org/stable/c/b33d4af102b9c1f7a83d3f0ad3cab7d2bab8f058 https://git.kernel.org/stable/c/8db10cee51e3e11a6658742465edc21986cf1e8d https://git.kernel.org/stable/c/cdb637d339572398821204a1142d8d615668f1e9