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 7FB7123D2A1 for ; Thu, 4 Sep 2025 15:33:35 +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=1757000015; cv=none; b=dmNAoeKq5lTKMFXU36nmtsGeFNP6nsdpcMJlABboj4MyGLudeT3ZhTY/JE4k8D2yWCgsQKRBeTr2zM1yjeAk9+y6qXxZtHlNjTbiFyRxKB3i9O3j4Nrqc5MfsY/9kA0lVIzdQ9wHfGpcG17wUKFubxfmIH07kDVHZJ9mhOHi9Jg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757000015; c=relaxed/simple; bh=HdEu2o1/LyzAKo/bmBomq1NIBvx8kShiNBMyg3vgOJY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gAJjta4Gy4MhsvRgW1nsLa1U0tcN6B01O531KQCejQr+cr9qvF9hL2V8tMwmOWAQ1YwNEvyOeXqynwHQJA74cIAtYBBCbo/x7Bs3/G0xbPYdYEorYvqqIDn3NxKKqEfuwAnPY+maluML56V3X4+mtbOh0ezPuJmNV2UXGMA2hFc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pNs6uDBI; 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="pNs6uDBI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E64B5C4CEF0; Thu, 4 Sep 2025 15:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757000015; bh=HdEu2o1/LyzAKo/bmBomq1NIBvx8kShiNBMyg3vgOJY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pNs6uDBIdFZTJonKilhJ4rNyBEZa3oB1ASyNIn8qyZaSp2qsu2l05i3E9LmRkuslA a3FIz0BD4psrPcSDO0FJY5TVgo7BtADIGo+gfZ246q307QvsCR4D86agIGxcaWlsFS cRiwpWzDiTy1R5yqQFUB61Wqf6cZhI6mi/tFuyv8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38690: drm/xe/migrate: prevent infinite recursion Date: Thu, 4 Sep 2025 17:32:55 +0200 Message-ID: <2025090449-CVE-2025-38690-ea6c@gregkh> X-Mailer: git-send-email 2.51.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=2585; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Q6fOCwtLrfymUKl2iz0U9qw3EOz/v34D1QtFwKjyniE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk7Nyp+aWLUP+rh1npuZ0X8G3E76ZW23aenuXTPZvRWW +0X/smqI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbS28AwTy1YR/Lg50sFPw2n 5fjzfmXW3P4mhGHBmm0Kx27fXr1nucHp/NrytbGm1ta7AA== 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/xe/migrate: prevent infinite recursion If the buf + offset is not aligned to XE_CAHELINE_BYTES we fallback to using a bounce buffer. However the bounce buffer here is allocated on the stack, and the only alignment requirement here is that it's naturally aligned to u8, and not XE_CACHELINE_BYTES. If the bounce buffer is also misaligned we then recurse back into the function again, however the new bounce buffer might also not be aligned, and might never be until we eventually blow through the stack, as we keep recursing. Instead of using the stack use kmalloc, which should respect the power-of-two alignment request here. Fixes a kernel panic when triggering this path through eudebug. v2 (Stuart): - Add build bug check for power-of-two restriction - s/EINVAL/ENOMEM/ (cherry picked from commit 38b34e928a08ba594c4bbf7118aa3aadacd62fff) The Linux kernel CVE team has assigned CVE-2025-38690 to this issue. Affected and fixed versions =========================== Issue introduced in 6.16 with commit 270172f64b114451876c1b68912653e72ab99f38 and fixed in 6.16.2 with commit 89f511c024879c5812cc0c010a6663b5e49950f3 Issue introduced in 6.16 with commit 270172f64b114451876c1b68912653e72ab99f38 and fixed in 6.17-rc2 with commit 9d7a1cbebbb691891671def57407ba2f8ee914e8 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-2025-38690 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/xe/xe_migrate.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/89f511c024879c5812cc0c010a6663b5e49950f3 https://git.kernel.org/stable/c/9d7a1cbebbb691891671def57407ba2f8ee914e8