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 0FA7729CB54 for ; Sat, 16 Aug 2025 10:58:22 +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=1755341903; cv=none; b=AUwPTma27ge0CSwOXpnAxSKFu5CSlV8aasmq94nRjv6y7StsIgBPwwKRe6SrbxHCSDlgLvWmzsHdyswhtnu0nZk5EEowcky9gg+zt2hfoNWrQrOpQ4o+0u6qbwHCaLhWLEa/7jM9hr4BV7h8yfcJlE6wuHKG0l2ydChbT+DhrcU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755341903; c=relaxed/simple; bh=0QYnKjBuz0RtkIM820rrpG5/MLtYLjNi9Ki/HhZLjic=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=riI/u/XeipPtgfh/rFMCE2tRV+oedqa7sYlonQxIkROBRSzLHuXXYu/WWZUWEVnBNtai9jj9vJeznSHB8eN/OmHmgmhANEUtx3JnWeWI6lOZk5YYX5AyFOlxUyhx8/AiZ5xxD+pISEMwUKRWsTZNFyqngmo1OJoh3VMChKEu7As= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PG6zbnAr; 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="PG6zbnAr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A43BC4CEEF; Sat, 16 Aug 2025 10:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755341902; bh=0QYnKjBuz0RtkIM820rrpG5/MLtYLjNi9Ki/HhZLjic=; h=From:To:Cc:Subject:Date:Reply-to:From; b=PG6zbnArGD3hkoTT3aoTkuUflg2OWa1pz9U4HKwcbYhSXw4YXgVmwAW7ajeVXBWD2 GH2l7rDiYQVedp9MJHDuzUpje3UgnXLD+ut+gDxUygr/YNPGhXsJRjhfS7kc9EgHlW PGjv9NI07XDaGLnKobM1zY1E5ABmWajFzguQLaJs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38515: drm/sched: Increment job count before swapping tail spsc queue Date: Sat, 16 Aug 2025 12:57:57 +0200 Message-ID: <2025081652-CVE-2025-38515-7495@gregkh> X-Mailer: git-send-email 2.50.1 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=3619; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vwVFQLcOGLnYXjdPGqjXSzeeo/iqnumhAN8YG1bQwpc=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkLUgzCmrnu5FxZXiZ44GCGyS63d9V3VLxLza7Wtcy+2 zFZU4e/I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTAC7SwLCg7409t9YPX8XHK+2E D87e8TnIlfczw3z3TRaHNxw9npzx2FLkmsrM9H3vJFwA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/sched: Increment job count before swapping tail spsc queue A small race exists between spsc_queue_push and the run-job worker, in which spsc_queue_push may return not-first while the run-job worker has already idled due to the job count being zero. If this race occurs, job scheduling stops, leading to hangs while waiting on the job’s DMA fences. Seal this race by incrementing the job count before appending to the SPSC queue. This race was observed on a drm-tip 6.16-rc1 build with the Xe driver in an SVM test case. The Linux kernel CVE team has assigned CVE-2025-38515 to this issue. Affected and fixed versions =========================== Issue introduced in 4.16 with commit 27105db6c63a571b91d01e749d026105a1e63bcf and fixed in 5.4.296 with commit 549a9c78c3ea6807d0dc4162a4f5ba59f217d5a0 Issue introduced in 4.16 with commit 27105db6c63a571b91d01e749d026105a1e63bcf and fixed in 5.10.240 with commit e62f51d0ec8a9baf324caf9a564f8e318d36a551 Issue introduced in 4.16 with commit 27105db6c63a571b91d01e749d026105a1e63bcf and fixed in 5.15.189 with commit ef841f8e4e1ff67817ca899bedc5ebb00847c0a7 Issue introduced in 4.16 with commit 27105db6c63a571b91d01e749d026105a1e63bcf and fixed in 6.1.146 with commit f9a4f28a4fc4ee453a92a9abbe36e26224d17749 Issue introduced in 4.16 with commit 27105db6c63a571b91d01e749d026105a1e63bcf and fixed in 6.6.99 with commit c64f5310530baf75328292f9b9f3f2961d185183 Issue introduced in 4.16 with commit 27105db6c63a571b91d01e749d026105a1e63bcf and fixed in 6.12.39 with commit e2d6547dc8b9b332f9bc00875197287a6a4db65a Issue introduced in 4.16 with commit 27105db6c63a571b91d01e749d026105a1e63bcf and fixed in 6.15.7 with commit ef58a95457466849fa7b31fd3953801a5af0f58b Issue introduced in 4.16 with commit 27105db6c63a571b91d01e749d026105a1e63bcf and fixed in 6.16 with commit 8af39ec5cf2be522c8eb43a3d8005ed59e4daaee 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-38515 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: include/drm/spsc_queue.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/549a9c78c3ea6807d0dc4162a4f5ba59f217d5a0 https://git.kernel.org/stable/c/e62f51d0ec8a9baf324caf9a564f8e318d36a551 https://git.kernel.org/stable/c/ef841f8e4e1ff67817ca899bedc5ebb00847c0a7 https://git.kernel.org/stable/c/f9a4f28a4fc4ee453a92a9abbe36e26224d17749 https://git.kernel.org/stable/c/c64f5310530baf75328292f9b9f3f2961d185183 https://git.kernel.org/stable/c/e2d6547dc8b9b332f9bc00875197287a6a4db65a https://git.kernel.org/stable/c/ef58a95457466849fa7b31fd3953801a5af0f58b https://git.kernel.org/stable/c/8af39ec5cf2be522c8eb43a3d8005ed59e4daaee