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 976DC1CCEDB for ; Sun, 19 Jan 2025 11:53:23 +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=1737287603; cv=none; b=jcZwu7enXrJTXy9eCRSqmsq/J+Fk2rMb2EPcCZbYFRhhBQcXonuaP5S4n1CxeBL2qmaH+FEjjBZ+MffFbN0jyOZCwM6ixbPUDZdZRjC8t02yeWqafQ2Kv5UxJ+ow7op/+g+ANtS6+TKE/GHkjrzAJD4zie2MWbivbfxaoV648WM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737287603; c=relaxed/simple; bh=MXrjft5TCVOiRg/SQw6+bzDPYXfiQgHZ74hklrn6Iu0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DdV7tK0AMGwk7J5Q5laC66Nx/5Qu2nzolcR2p3JQNM4CHtBbr6vHe2N1TNEAgKpf34KdZ7sc9cjfAJhLqu7PlLy6w3/Qc4Nmzpt+zrWBG4dATS+P1c1VzuS2NIHqBcryVuQBbR/ogWGNRxOrKry/oMDC9in+VNaXjBaSM4uV/94= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WCKn/m/Q; 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="WCKn/m/Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17A88C4CED6; Sun, 19 Jan 2025 11:53:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737287603; bh=MXrjft5TCVOiRg/SQw6+bzDPYXfiQgHZ74hklrn6Iu0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=WCKn/m/Ql7kUm9BvqKwXteubRAjfKEN0YV6jbSKVpu1FQIdgtq5OBJtNDxxNu0aZ0 pHX+OhTfQ1OAXcbK90C92TAtydGrvuCccqhWs0b2/FKqgIPzjLNUjM5NbMrCHcCzK1 lsocMuZlpfthmerCN70GbtsAKjq4McgvUhyqHNzE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57921: drm/amdgpu: Add a lock when accessing the buddy trim function Date: Sun, 19 Jan 2025 12:52:52 +0100 Message-ID: <2025011942-CVE-2024-57921-836d@gregkh> X-Mailer: git-send-email 2.48.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=4158; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=MXrjft5TCVOiRg/SQw6+bzDPYXfiQgHZ74hklrn6Iu0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk9z7tiN5XVL17DaiveLS29PLIjPu3ac9E18kZfZ2+K2 qnDlbKhI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbyxZ9hrsxl9SdnWeanG04L EP1Rrp/F93nae4YFG8Ln3K60NvqfHlzbe41VQGjHtTnNAA== 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: Add a lock when accessing the buddy trim function When running YouTube videos and Steam games simultaneously, the tester found a system hang / race condition issue with the multi-display configuration setting. Adding a lock to the buddy allocator's trim function would be the solution. [ 7197.250436] general protection fault, probably for non-canonical address 0xdead000000000108 [ 7197.250447] RIP: 0010:__alloc_range+0x8b/0x340 [amddrm_buddy] [ 7197.250470] Call Trace: [ 7197.250472] [ 7197.250475] ? show_regs+0x6d/0x80 [ 7197.250481] ? die_addr+0x37/0xa0 [ 7197.250483] ? exc_general_protection+0x1db/0x480 [ 7197.250488] ? drm_suballoc_new+0x13c/0x93d [drm_suballoc_helper] [ 7197.250493] ? asm_exc_general_protection+0x27/0x30 [ 7197.250498] ? __alloc_range+0x8b/0x340 [amddrm_buddy] [ 7197.250501] ? __alloc_range+0x109/0x340 [amddrm_buddy] [ 7197.250506] amddrm_buddy_block_trim+0x1b5/0x260 [amddrm_buddy] [ 7197.250511] amdgpu_vram_mgr_new+0x4f5/0x590 [amdgpu] [ 7197.250682] amdttm_resource_alloc+0x46/0xb0 [amdttm] [ 7197.250689] ttm_bo_alloc_resource+0xe4/0x370 [amdttm] [ 7197.250696] amdttm_bo_validate+0x9d/0x180 [amdttm] [ 7197.250701] amdgpu_bo_pin+0x15a/0x2f0 [amdgpu] [ 7197.250831] amdgpu_dm_plane_helper_prepare_fb+0xb2/0x360 [amdgpu] [ 7197.251025] ? try_wait_for_completion+0x59/0x70 [ 7197.251030] drm_atomic_helper_prepare_planes.part.0+0x2f/0x1e0 [ 7197.251035] drm_atomic_helper_prepare_planes+0x5d/0x70 [ 7197.251037] drm_atomic_helper_commit+0x84/0x160 [ 7197.251040] drm_atomic_nonblocking_commit+0x59/0x70 [ 7197.251043] drm_mode_atomic_ioctl+0x720/0x850 [ 7197.251047] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [ 7197.251049] drm_ioctl_kernel+0xb9/0x120 [ 7197.251053] ? srso_alias_return_thunk+0x5/0xfbef5 [ 7197.251056] drm_ioctl+0x2d4/0x550 [ 7197.251058] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [ 7197.251063] amdgpu_drm_ioctl+0x4e/0x90 [amdgpu] [ 7197.251186] __x64_sys_ioctl+0xa0/0xf0 [ 7197.251190] x64_sys_call+0x143b/0x25c0 [ 7197.251193] do_syscall_64+0x7f/0x180 [ 7197.251197] ? srso_alias_return_thunk+0x5/0xfbef5 [ 7197.251199] ? amdgpu_display_user_framebuffer_create+0x215/0x320 [amdgpu] [ 7197.251329] ? drm_internal_framebuffer_create+0xb7/0x1a0 [ 7197.251332] ? srso_alias_return_thunk+0x5/0xfbef5 (cherry picked from commit 3318ba94e56b9183d0304577c74b33b6b01ce516) The Linux kernel CVE team has assigned CVE-2024-57921 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 4a5ad08f537703c35cf7cc29845381805c891d9b and fixed in 6.12.10 with commit 758e3c3054b65336cf0c5f240221f63b4fb98478 Issue introduced in 6.11 with commit 4a5ad08f537703c35cf7cc29845381805c891d9b and fixed in 6.13-rc7 with commit 75c8b703e5bded1e33b08fb09b829e7c2c1ed50a 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-57921 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_vram_mgr.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/758e3c3054b65336cf0c5f240221f63b4fb98478 https://git.kernel.org/stable/c/75c8b703e5bded1e33b08fb09b829e7c2c1ed50a