Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 8CE543D47A7 for ; Thu, 24 Sep 2026 16:21:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790266916; cv=none; b=aylAH+O1VFF5Sszk4Y29Eo511yl/e1CsGxrB4B/PxMdoS6/Dyrr6IBi0DEKmncwRc1jA9SOI7pTPhHgljQZWKe9BI4AkJeNWRwrVHxJPCROO/C+sirnLv19BwtE+dAk80lCoF7n7y1lE4B0boGOuPtuG3yGz1Efzlb0bywyuiFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790266916; c=relaxed/simple; bh=mHZmFhZklYEYokbF4kT96uMS+9aep7uhc97tsFLh1uQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eG7e7K3MH/YP4jTSgsX+twgqUZY1aNZ1t8hZp935h51Ad73MUgpuyh2SwpsaCQgQUiRAWghTBm45UWPYMOdRY6ImcUwi8paE9e4iwcKtsd2yt2CSfVEwz+E+s+L6Uof5x8+sqJH0urDQbVg8PNVYL3S1uVSjv4LySbJu8pK33Xc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ti47TP78; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Ti47TP78" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 558EF1F000FF; Thu, 24 Sep 2026 16:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790266915; bh=LYomI3d4eCe5Jzg36QJrokC/e5H5PKqpU7gynPadXoM=; h=From:To:Cc:Subject:Date:Reply-To; b=Ti47TP78VTa2RLctVsV99gCMY4QMqz4vweU4pPs96HGDu9uBPD7wAlA2X+vRMa05b R3Xfnz259/tUPVlEEOb0CbsItcuz5Xl6ppV896wemOkwCQhGAVYf87i9jvLSe2S2TO jcvsPgVLj1Z70xxBR5FP9MRW+8N+qQE3sNe7XEQ0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-97496: drm/amdkfd: Fix OOB memory exposure in get_wave_state() Date: Thu, 24 Sep 2026 18:04:21 +0200 Message-ID: <2026092440-CVE-2026-97496-bcc1@gregkh> X-Mailer: git-send-email 2.55.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=2652; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gKTZ8pz70gIDROg0K0yRqAboXUFfkjwwfH1jIPCJn8U=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlbPRe8TD5sc8NO5+jqazXZPJsEXWy+hz8K/72xWqhf/ 97RfZevd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEbF8yzM9nX29Um52uv5K7 VUlwziqvstkmigwLVvGIpP0tefO37YPKNTmtm4wadbkrAQ== 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/amdkfd: Fix OOB memory exposure in get_wave_state() The get_wave_state() function for v9 trusts cp_hqd_cntl_stack_size and cp_hqd_cntl_stack_offset values read directly from the MQD, which are written by GPU microcode and fully attacker-controlled on the CRIU-restore path (via AMDKFD_IOC_RESTORE_PROCESS with H3). this leads to an unbounded copy_to_user() that can leak adjacent GTT/kernel memory. If offset > size, integer underflow produces a ~4 GiB read length, if size is set to 1 MiB against a 4 KiB allocation, we leak 1 MiB of adjacent kernel memory (other queues' MQDs, ring buffers, KASLR pointers). Fix by clamping both cp_hqd_cntl_stack_size to the actual allocated buffer size (q->ctl_stack_size) and cp_hqd_cntl_stack_offset to the clamped size before performing arithmetic and copy_to_user(). This ensures we never read beyond the allocated kernel BO regardless of attacker-supplied MQD field values. The Linux kernel CVE team has assigned CVE-2026-97496 to this issue. Affected and fixed versions =========================== Fixed in 6.12.111 with commit d9183d974ddd5f09d029beaf359275ac20d4d5fe Fixed in 6.18.53 with commit ec646686613d8ab05b282d1463a7baa49fd6b83b Fixed in 7.2 with commit 7ef144458f48d5589e36f1b3d83e83db2e5c5ba5 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-97496 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_mqd_manager_v9.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/d9183d974ddd5f09d029beaf359275ac20d4d5fe https://git.kernel.org/stable/c/ec646686613d8ab05b282d1463a7baa49fd6b83b https://git.kernel.org/stable/c/7ef144458f48d5589e36f1b3d83e83db2e5c5ba5