From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796289918; b=oHEC1wezJeETuC+RyceVQUs2ibUxGRQpfDXKRXDKjmAbdzYCoJPQyChfN2rZXUSbTjBz 9+dkldgTzl4PdpxyfWyn4w5QnGbVrvYb84dRre91eGq3eDn/kQDrRFk06dn8jpR7NnjNn tk87b7XWCH07aXiQ3CV+KCm82B/xkJTJa7cfnvXP8T8v+FzuUYpJNULWx0OQ+MH5hYfU6 OtJ1Arr5UmJ5lusYWqQafOxGy/vPa8hDvgLXIg6UKRIfo2s8bV/4Ve/Cnzo0bhiHhFmUA +4ijs8e3riTbl2id4F2Ez2o6W6+PAXHfFpoQeRuHTgCAlBetfZBC8mjnGamIuuPnvTw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796289918; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=qIxuQdn+ZHgGJvju46PQ1wE8DljQlxv+hM3A7JBKz54=; b=38t8dDHAPQy6XMO3Ns/t7EmQEtzODwF1gnq7sI2I3dM4GeIDpr3o5Kf6dPTXAASJHpm0 K9a6KLfYeqYjCLJ++eyINNNINhUhLDoswEb1VOMwziKXSClBfV9IejsieNK4+wUQFokXm cu1gK1LHU4j9CVCrD9WRt4F5l6Nekf3Ip9pq1CCwgkpEfceRTeOJB3JeFnajsYLurijiM gdLGTau5L5sJIFx8mxlFi0/VgJQd0rUfHjmdRqONr6+ImKJffcPSfD6wjCTmZyQw7rMZf FqCNLFNOtcMyaeVWUWfjr2mTh7uSqjj9Lm6mYXlYgL4wb7XWm0wSkzwmHMdra5rSzKQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=MUGt6Mm6; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A43A606A32D for ; Thu, 3 Dec 2026 09:25:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=MUGt6Mm6 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B68981F000C1; Thu, 3 Dec 2026 09:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796289918; bh=qIxuQdn+ZHgGJvju46PQ1wE8DljQlxv+hM3A7JBKz54=; h=From:To:Cc:Subject:Date:Reply-To; b=MUGt6Mm6SPc62zMG5IeHwJXxUWxjBV6hkUK1dOIWkouzYgSkUEmBuhijc5Z/v9MVt YWnh98LaFJWlYczM8u9ZiUmJ+GqFexNFQ4ELY5j/vN63NUQGEFsHD9ohxOxYPwnYOu aHxG5VtKYjLcSSL007klGr+G1zx3646vCc+y21Y8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-143085: sched_ext: Fix stale pick when the donor changes during dispatch Date: Thu, 3 Dec 2026 10:18:41 +0100 Message-ID: <2026120353-CVE-2026-143085-bd2d@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4160; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=FMI8xV/doClroVLE0cWmYn49+db4YrwiUl9EC8fDKbs=; b=owGbwMvMwCRo6H6F97bub03G02pJDNmCxq1Vxmt+GSte1xVemMiQItCgv9Z1c6lNkP6XVSyvD M5yPb7fEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPRiWBY0L4zxrhmxj7N9uYD CWLZmsLyhxuKGebXstw9Wf/dbA3nl8KsWdMq3UQPnHgHAA== 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: sched_ext: Fix stale pick when the donor changes during dispatch Dispatch takes rq->donor as @prev and can drop the rq lock. With proxy execution, @prev may not be the running task, and another CPU can reset the donor to rq->curr meanwhile, through proxy_needs_return() on a wakeup or sched_proxy_block_task() on a class or scheduler change. The wakeup case: 1. dispatch_one() drops the rq lock, e.g. to move a task from another CPU. 2. Another CPU wakes the donor, which proxy execution migrated to this CPU. proxy_needs_return() dequeues it and resets the donor to rq->curr, and the wakeup enqueues it, possibly on another CPU. 3. dispatch_one() sees @prev queued and returns SCX_DSP_PREV. 4. do_pick_task_scx() returns @prev, and this CPU runs a task that is queued on another rq. Under core scheduling, the core pick runs dispatch for the sibling rqs with each sibling's donor as @prev, and a sibling can switch @prev out while dispatch has the lock dropped. Whatever dispatch concluded, and whatever it does with @prev after the drop, is about a task the rq no longer owns, whether it keeps @prev running or hands it to ops.dispatch(). rq_modified_above() catches the change only when rq->curr is in a class above ext, and the dl_server pick skips that check. dispatch_core_pick() retries after a lock drop, but by then dispatch has used @prev. Restart the pick when @prev is no longer the donor. dispatch_one() tests after each step that can drop the lock, and scx_dispatch_sched() decides per ops.dispatch() call whether to hand @prev over, which also covers a class or scheduler change across a drop. With proxy execution alone, the donor only ever changes to rq->curr during a pick, so the retried pick can't go stale again. Under core scheduling, the restart goes through the core pick, which already retries after any lock drop. 7a3a6bfbd62a ("sched: Rework prev_balance() to avoid stale prev references") closed the same window in prev_balance() by reading rq->donor instead of taking @prev. That doesn't work here, as dispatch never evaluated the new donor, which may not even be a sched_ext task. Verified with synthetic reproducers for both cases. v2: Also cover rq lock drops inside dispatch (sashiko). v3: Don't keep a stale @prev after ops.dispatch() (sashiko). v4: Also cover a sibling switching @prev out under core scheduling. Retitle. The Linux kernel CVE team has assigned CVE-2026-143085 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 7b0888b7cc1924b74ce660e02f6211df8dd46e7b and fixed in 7.3.7 with commit b88438530ee3978b1d3f24576c4f508be2b30b82 Issue introduced in 6.12 with commit 7b0888b7cc1924b74ce660e02f6211df8dd46e7b and fixed in 7.4-rc3 with commit 9ce6fca02867911ba79bc3664219effe8c7be8f4 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-143085 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: kernel/sched/ext/ext.c kernel/sched/ext/inlines.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/b88438530ee3978b1d3f24576c4f508be2b30b82 https://git.kernel.org/stable/c/9ce6fca02867911ba79bc3664219effe8c7be8f4