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 17B93274B4A for ; Thu, 4 Sep 2025 15:35:44 +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=1757000144; cv=none; b=GUKzYhBUmd+LkjBg2rpcWDBnF94llipMifrFVBR5nixjRszuIzf6xDptzRma+s+OoY/rjardEoBwOOLD68G4xjjvjyjb1IYeZuuMMPeuCbu2i4BT+AGNk1S8nIuydoIoHh5s/6S0w/Q9rLzUXErCB6D1hpbh8xcFWagd3+R/rUU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757000144; c=relaxed/simple; bh=EFJasRPZf2clZlfEu47FMmTYgoAvov6I6IO65XJnSCo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dQvpQVeSdefuSjOlKiyoLzVrFlEMmlTahz3q1YX1nvflWCQ7bp5wY0JJUiA+Wv8L2NwZza27qqYwNoI0/lnFJczOzYZTWJIHI3Lb1u3HYwrbEkGj2mTd013bYwuZcrSIHAXkSvJh2SX7pdgAMC7tRsWL+Qsqd49r3ZexE0zRAHc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xzz2a5Zr; 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="xzz2a5Zr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91AB8C4CEF0; Thu, 4 Sep 2025 15:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757000144; bh=EFJasRPZf2clZlfEu47FMmTYgoAvov6I6IO65XJnSCo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=xzz2a5ZrJOdAedHAzQ0HcbW2+DpTw5pvD7WSPuPgUqGLRjufp0B/9HeqypokhUXGg Ye8FdDFRJqmyibLoHxZxAuCePiNkagV7w+GcAzXVMnzcUA9T39HK6cYcTxhN6CuyJg EgI2085PIZsZ1MViNgcDhyzvbCW+kesPQEaNDWRA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38703: drm/xe: Make dma-fences compliant with the safe access rules Date: Thu, 4 Sep 2025 17:33:08 +0200 Message-ID: <2025090453-CVE-2025-38703-2f5c@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=2751; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4J+YDiyWnQgVUk44sgHiACRXVGGg6QGd/1Mh2fKE1Gk=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk7N6o1ftzVZz/pzsdrHxZ17ryz7pNATEJp7IwNbe9rN ik+FuNd2BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATOXScYUHv2TsyUy5v0kqb 8f/nqi4Zp2nBlVMZFizlXd76+E2Owy/2TWZr/PeLOmy/yQ0A 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: Make dma-fences compliant with the safe access rules Xe can free some of the data pointed to by the dma-fences it exports. Most notably the timeline name can get freed if userspace closes the associated submit queue. At the same time the fence could have been exported to a third party (for example a sync_fence fd) which will then cause an use- after-free on subsequent access. To make this safe we need to make the driver compliant with the newly documented dma-fence rules. Driver has to ensure a RCU grace period between signalling a fence and freeing any data pointed to by said fence. For the timeline name we simply make the queue be freed via kfree_rcu and for the shared lock associated with multiple queues we add a RCU grace period before freeing the per GT structure holding the lock. The Linux kernel CVE team has assigned CVE-2025-38703 to this issue. Affected and fixed versions =========================== Fixed in 6.12.43 with commit b17fcce70733c211cb5dabf54f4f9491920b1d92 Fixed in 6.15.11 with commit ba37807d08bae67de6139346a85650cab5f6145a Fixed in 6.16.2 with commit 683b0e397dad9f26a42dcacf6f7f545a77ce6c06 Fixed in 6.17-rc1 with commit 6bd90e700b4285e6a7541e00f969cab0d696adde 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-38703 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_guc_exec_queue_types.h drivers/gpu/drm/xe/xe_guc_submit.c drivers/gpu/drm/xe/xe_hw_fence.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/b17fcce70733c211cb5dabf54f4f9491920b1d92 https://git.kernel.org/stable/c/ba37807d08bae67de6139346a85650cab5f6145a https://git.kernel.org/stable/c/683b0e397dad9f26a42dcacf6f7f545a77ce6c06 https://git.kernel.org/stable/c/6bd90e700b4285e6a7541e00f969cab0d696adde