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 35E442877DC for ; Thu, 11 Sep 2025 16:53:17 +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=1757609597; cv=none; b=o47jhIvaCMCmCqPh0WRFCLijTSTLCN3ynwBpr8DU38xfhcV3ien2FjaF8Ro4a/vnWUKm9B5BngWu+JkGIOpiBtdiwS8l0oZsGZp484Lq2qV4X/I+9ogEoFDKI0MDVUTcfdaae7QfEkgcUilLIba+C4JG4GyDzYXvJPVcygHWtS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757609597; c=relaxed/simple; bh=RnZk+l0B+Xu/2W7uwvRL7rq7zhkC9p0wXAL3bftPQgc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=J3H16PhsZM2AwKYugFT8p8XZTHh6dIdeghldKkZwntel60zhW6myGi+YltxQtb7ZujXuPLKYkGP1ooVt+A16yvz+uDEvaMeCKYmFg3m3uga6gMwbtteSGGF76u1BmVwJ/OoO3VFCvYDs2MQlIWJyn1cNMg74OSZ99LcDe5tQgmo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IQXnyydw; 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="IQXnyydw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA9ACC4CEF0; Thu, 11 Sep 2025 16:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757609597; bh=RnZk+l0B+Xu/2W7uwvRL7rq7zhkC9p0wXAL3bftPQgc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=IQXnyydw+GhOKo2aqecGZlOC9mBH9EQBI2VkYhEuHurj8xKmLTYw68AJw4Ns6UBWe b+/+PqJkujR30rKbdp868nxyvmbDSUm8UGlCjFZ0s7psVguT1jIAaddm8xVstHcXEz JBwQWIaYm3ftJHo+7yzIbzM+PSS4NqdACa9MUcOI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39740: drm/xe/migrate: prevent potential UAF Date: Thu, 11 Sep 2025 18:52:41 +0200 Message-ID: <2025091138-CVE-2025-39740-6b46@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=2033; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sg2WCPHpAMRaZw6/wysk5ggTRUcIqRxqNQI4ItOsRZ4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmH/oUlrnn5Jllt6iO11hLjeN2ubReu3bdN03+gWW1yd 9GNe7yzOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiBuUM8wt3zBAt/v5rybOc R6EBLlOm+bFLajIs6D8Vd//O9w8xi+5e8zrJcH1RS+V6WwA= 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 potential UAF If we hit the error path, the previous fence (if there is one) has already been put() prior to this, so doing a fence_wait could lead to UAF. Tweak the flow to do to the put() until after we do the wait. (cherry picked from commit 9b7ca35ed28fe5fad86e9d9c24ebd1271e4c9c3e) The Linux kernel CVE team has assigned CVE-2025-39740 to this issue. Affected and fixed versions =========================== Issue introduced in 6.16 with commit 270172f64b114451876c1b68912653e72ab99f38 and fixed in 6.16.2 with commit 7e46fa64a4b94208563c3a5bf1d7f4346f94abea Issue introduced in 6.16 with commit 270172f64b114451876c1b68912653e72ab99f38 and fixed in 6.17-rc2 with commit 145832fbdd17b1d77ffd6cdd1642259e101d1b7e 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-39740 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/7e46fa64a4b94208563c3a5bf1d7f4346f94abea https://git.kernel.org/stable/c/145832fbdd17b1d77ffd6cdd1642259e101d1b7e