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 205953C3425 for ; Fri, 1 May 2026 14:18:38 +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=1777645118; cv=none; b=Ckz7Fh+VIkM9qCQ2NQdNUEmdVndM6iCucwnw9W+USTUMeNzFXQ4dTVm4xVWGfLPqmueGO6IVeEZwxK4NsvcELXFQHBlcUaMcGC0l4SdLFeOheHvn+Ln/OFJ+hszaqIU0t+haHBYkmym6ruzu6etJ58QpboSRHFNo5nN0oaZpZmY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777645118; c=relaxed/simple; bh=okGcHVDfU3FyGCMeg9+Pld/wMpBaTmexu3vLXFO+CkE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MIujh68rtS8rdTEsN5SqFND3bAuG4aknZJfqAtW8JlglHa1JOiqETj1Tr7r2vTYVk0g65Vvnty8F07L3nKEIguoZYp8f0jRnLU6V5IEBHapXYy/Wlj2eon+qVHtZ0FDYpigPA6KsGLyRgefKnQ7qeAqtn97KqaPzOkLZzrHBhtU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TvinO5K3; 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="TvinO5K3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A92B0C2BCC4; Fri, 1 May 2026 14:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777645118; bh=okGcHVDfU3FyGCMeg9+Pld/wMpBaTmexu3vLXFO+CkE=; h=From:To:Cc:Subject:Date:Reply-To:From; b=TvinO5K3ci21ZWBR7eQUTD9kWalKuGPM0oj2QnmMKUSKgAVf3DPguOHbkOcZwC5ZS 9w/y4klpjgIoXoKJ8e0fIOuxtmkwDEbOX9yXVEJRMH9V5MXt8oyblvpuf2LwcsPBtl TeseHRIC06zGYyu5Cnv9YNpppPPH3WZD7J/esYvU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31765: drm/amdgpu: Change AMDGPU_VA_RESERVED_TRAP_SIZE to 64KB Date: Fri, 1 May 2026 16:15:16 +0200 Message-ID: <2026050146-CVE-2026-31765-19a6@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5055; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=J9phIkVzcteCtSxvx//ZdI0ezAxM3naQdapW4A05BM8=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlftoa/OfBe1j5xYu6Oy0vr3nz/v4D9WL2A6zrTxf/ST 7DsmrrKuCOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmMsOCYcHOEpX/OccUH9nd E5N+sEAza3cU40OGBV3yMjkRB1+J2D08FLPF8eIRJadJEgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: Change AMDGPU_VA_RESERVED_TRAP_SIZE to 64KB Currently, AMDGPU_VA_RESERVED_TRAP_SIZE is hardcoded to 8KB, while KFD_CWSR_TBA_TMA_SIZE is defined as 2 * PAGE_SIZE. On systems with 4K pages, both values match (8KB), so allocation and reserved space are consistent. However, on 64K page-size systems, KFD_CWSR_TBA_TMA_SIZE becomes 128KB, while the reserved trap area remains 8KB. This mismatch causes the kernel to crash when running rocminfo or rccl unit tests. Kernel attempted to read user page (2) - exploit attempt? (uid: 1001) BUG: Kernel NULL pointer dereference on read at 0x00000002 Faulting instruction address: 0xc0000000002c8a64 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries CPU: 34 UID: 1001 PID: 9379 Comm: rocminfo Tainted: G E 6.19.0-rc4-amdgpu-00320-gf23176405700 #56 VOLUNTARY Tainted: [E]=UNSIGNED_MODULE Hardware name: IBM,9105-42A POWER10 (architected) 0x800200 0xf000006 of:IBM,FW1060.30 (ML1060_896) hv:phyp pSeries NIP: c0000000002c8a64 LR: c00000000125dbc8 CTR: c00000000125e730 REGS: c0000001e0957580 TRAP: 0300 Tainted: G E MSR: 8000000000009033 CR: 24008268 XER: 00000036 CFAR: c00000000125dbc4 DAR: 0000000000000002 DSISR: 40000000 IRQMASK: 1 GPR00: c00000000125d908 c0000001e0957820 c0000000016e8100 c00000013d814540 GPR04: 0000000000000002 c00000013d814550 0000000000000045 0000000000000000 GPR08: c00000013444d000 c00000013d814538 c00000013d814538 0000000084002268 GPR12: c00000000125e730 c000007e2ffd5f00 ffffffffffffffff 0000000000020000 GPR16: 0000000000000000 0000000000000002 c00000015f653000 0000000000000000 GPR20: c000000138662400 c00000013d814540 0000000000000000 c00000013d814500 GPR24: 0000000000000000 0000000000000002 c0000001e0957888 c0000001e0957878 GPR28: c00000013d814548 0000000000000000 c00000013d814540 c0000001e0957888 NIP [c0000000002c8a64] __mutex_add_waiter+0x24/0xc0 LR [c00000000125dbc8] __mutex_lock.constprop.0+0x318/0xd00 Call Trace: 0xc0000001e0957890 (unreliable) __mutex_lock.constprop.0+0x58/0xd00 amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x6fc/0xb60 [amdgpu] kfd_process_alloc_gpuvm+0x54/0x1f0 [amdgpu] kfd_process_device_init_cwsr_dgpu+0xa4/0x1a0 [amdgpu] kfd_process_device_init_vm+0xd8/0x2e0 [amdgpu] kfd_ioctl_acquire_vm+0xd0/0x130 [amdgpu] kfd_ioctl+0x514/0x670 [amdgpu] sys_ioctl+0x134/0x180 system_call_exception+0x114/0x300 system_call_vectored_common+0x15c/0x2ec This patch changes AMDGPU_VA_RESERVED_TRAP_SIZE to 64 KB and KFD_CWSR_TBA_TMA_SIZE to the AMD GPU page size. This means we reserve 64 KB for the trap in the address space, but only allocate 8 KB within it. With this approach, the allocation size never exceeds the reserved area. (cherry picked from commit 31b8de5e55666f26ea7ece5f412b83eab3f56dbb) The Linux kernel CVE team has assigned CVE-2026-31765 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit 34a1de0f79352086884553f78db271f957a98583 and fixed in 6.12.81 with commit 6b2614a0ff05a2d2836311425091c8feca6f0c21 Issue introduced in 6.9 with commit 34a1de0f79352086884553f78db271f957a98583 and fixed in 6.18.22 with commit 77c918eaa4c916751769242567407f61c6af142a Issue introduced in 6.9 with commit 34a1de0f79352086884553f78db271f957a98583 and fixed in 6.19.12 with commit d3508cf822c4d96d3e492210314f8f6f2da7df58 Issue introduced in 6.9 with commit 34a1de0f79352086884553f78db271f957a98583 and fixed in 7.0 with commit 4487571ef17a30d274600b3bd6965f497a881299 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-2026-31765 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_vm.h drivers/gpu/drm/amd/amdkfd/kfd_priv.h 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/6b2614a0ff05a2d2836311425091c8feca6f0c21 https://git.kernel.org/stable/c/77c918eaa4c916751769242567407f61c6af142a https://git.kernel.org/stable/c/d3508cf822c4d96d3e492210314f8f6f2da7df58 https://git.kernel.org/stable/c/4487571ef17a30d274600b3bd6965f497a881299