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 D9B7A1FBCB5 for ; Mon, 21 Oct 2024 18:07:12 +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=1729534032; cv=none; b=VNC0QteIaQYsehV6oKjGO4AcAnCb9hrSfbGD1RsT4gQRyRqum+r0Kzl0ztGMW9Mj8XHz9YP8jiyiY2Mu8i7tUciK0zqNfSSq0i+rPiRsP82ZSiqxJBkGtSPY1U8p90XNQNv8kluY4SRUaud8+tp/LD5har6YNhQn04VlxegUsDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729534032; c=relaxed/simple; bh=Azr9Pl2tfIGRVoRp19OwwUrJ9150FRXoeuKDvjH7M1U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HSZNGHJWeRonfkBMYQkxsdzkQkviP+9YWhy1h7rZ+GibhCA1QgU7b5LziU0kEokXKeI+yRwu523VKPepCC/AyvJEju57uN0fB/3YVhnQy1lv5dBJ5rGxkSh7VQAKbWtZDJ00C6AJB5vRxmj2J/uPAQKTLPWHJFhMP9znxk/zMyA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qITw9fFs; 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="qITw9fFs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BD66C4CEC3; Mon, 21 Oct 2024 18:07:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729534032; bh=Azr9Pl2tfIGRVoRp19OwwUrJ9150FRXoeuKDvjH7M1U=; h=From:To:Cc:Subject:Date:Reply-to:From; b=qITw9fFsNsvdZqvhUeEKuWPn8Qe9r2ICYR4mEspZgiAV60WoRnLyaLu0h0a4nNJbb Ku15gW43HVYTpxqTtuBgT833MsacGZbShHdzeeUQeD2EriEl7QT9eyqt+4VXIFDQW0 iIQIjxUhTKVr9g7b8/N7on8EJQ1Ti61ypoX/SwZc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-49970: drm/amd/display: Implement bounds check for stream encoder creation in DCN401 Date: Mon, 21 Oct 2024 20:02:58 +0200 Message-ID: <2024102133-CVE-2024-49970-a345@gregkh> X-Mailer: git-send-email 2.47.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=2490; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Azr9Pl2tfIGRVoRp19OwwUrJ9150FRXoeuKDvjH7M1U=; b=owGbwMvMwCRo6H6F97bub03G02pJDOli0/6+dp3lneud/zj0y8tnSU+CMlPZNXtylA0mdCdkn 7td1XOgI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbCfoVhvpPvRa1ImTvi+hm/ dXvWeRl5eHDNYVjQeqjqunTb3/fvHFwzpgooT6lXlbwFAA== 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: Implement bounds check for stream encoder creation in DCN401 'stream_enc_regs' array is an array of dcn10_stream_enc_registers structures. The array is initialized with four elements, corresponding to the four calls to stream_enc_regs() in the array initializer. This means that valid indices for this array are 0, 1, 2, and 3. The error message 'stream_enc_regs' 4 <= 5 below, is indicating that there is an attempt to access this array with an index of 5, which is out of bounds. This could lead to undefined behavior Here, eng_id is used as an index to access the stream_enc_regs array. If eng_id is 5, this would result in an out-of-bounds access on the stream_enc_regs array. Thus fixing Buffer overflow error in dcn401_stream_encoder_create Found by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.c:1209 dcn401_stream_encoder_create() error: buffer overflow 'stream_enc_regs' 4 <= 5 The Linux kernel CVE team has assigned CVE-2024-49970 to this issue. Affected and fixed versions =========================== Fixed in 6.11.3 with commit b219b46ad42d Fixed in 6.12-rc1 with commit bdf606810210 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-49970 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/dc/resource/dcn401/dcn401_resource.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/b219b46ad42df1dea9258788bcfea37181f3ccb2 https://git.kernel.org/stable/c/bdf606810210e8e07a0cdf1af3c467291363b295