From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 54061584974 for ; Fri, 11 Sep 2026 19:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156546; cv=none; b=PrYIy5SRQt3j/12yHEROLHogiRuNe0h+YUlScmfxhtRE5Kv1+bforu3BEJ81OEnyYVHB9D7+mgSxpl+9w3JIQY7OzhFa4/NhYxaxtbNhsR7QrnmCaXc0Rl8WtjsaTVD0MV54UIXEyq2mh0pUql9uCiORwhNDgG7tSszAvBS4ZJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156546; c=relaxed/simple; bh=hibLvSrtk9holjRxicg85rzNpbv1nDiHq5tl2/lmy4A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GgxNbVZbsFD7lA/2ffyR/I8m/TOSg7BQ++2OIY1r9jndrQ7QZ9jOwY3weu1pX9R5FxKvD21ntd+SZEyAOF9iLQfHtgA3m6UNsHKnzrtx5nOWpnhYyh2xNEFQcmfGYgCP6I4vZNNAPoCdq4WEl8F3n4jsnxWJl66j+qq6C8V5I9w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pKxIKFpw; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pKxIKFpw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C691D1F00893; Fri, 11 Sep 2026 19:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789156541; bh=+FriWCLtebsHTRkEm4iOkDsKsm1TKEkvdggQqgvOndE=; h=From:To:Cc:Subject:Date:Reply-To; b=pKxIKFpw/P0//XZo+U9YL60OJy8G7XSsQcDkWYDh4Um+Kv/1TQqLmX8JZQ6ZKue+e 7UklhvTpjEWl9vBU8UTwixJHkWfdTXvxEdiaDWmqqgqpohG26sEerhA/bimMDxvk9N ARYVNxNlZcgW81B/vAlt6C9EkYP1D+LsbAWClifs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89517: sched_ext: Fix rq->core_pick corruption under core scheduling Date: Fri, 11 Sep 2026 21:43:26 +0200 Message-ID: <2026091113-CVE-2026-89517-db88@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4149; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vg4mApNGY5O25hLDvFvlvcRNjtnzKFv0kPU3z074jQ8=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIiP9+5Ry2n9b7Cw6wyzyZ8LKZRXVLRbfTb5cyCu/Z BB3qCqlI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYy+xnDgkknlfTSTJuyWvgZ X7S8v3fiY/sKNob5+cdNeS3r5FQusH09y7jbLv1i4c1oAA== 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 rq->core_pick corruption under core scheduling Core scheduling's pick_next_task() picks what to run on every SMT sibling of the core in a single pass under the shared core-wide rq lock. The selection state is consistent only while the lock is held continuously, so ->pick_task() originally could not release it. However, since 4c95380701f5 ("sched/ext: Fold balance_scx() into pick_task_scx()"), sched_ext runs dispatch from inside the pick and dispatching can drop the rq lock. To support this, pick_next_task() has been updated to restart the whole selection when a pick returns RETRY_TASK after releasing the lock. When selections on the same core interleave through the dropped lock, they corrupt each other's state: one clears the other's rq->core_pick leading to a NULL deref, or invalidates its keep-the-previous-task decision leaving a dequeued task running, which deadlocks the next wakeup and matches the reported hard hangs. A cookied ping-pong load on an SMT machine makes the interleavings frequent and kills the kernel within seconds. Fix it by making the pick return RETRY_TASK whenever dispatch released the rq lock, so that a selection only ever commits picks made under a continuously held lock. The previous patch's rq->scx.lock_drop_seq counts the releases. A dispatch that touched nothing never releases the lock and its verdict, including "nothing to run", stands: retries are bounded, each following a dispatch that actually did something, and an idle CPU does not loop. If another dispatch is already in flight on the rq, skip dispatching and pick from what is already queued locally - the in-flight dispatch has released the lock, so its own selection will retry and re-pick this rq, while returning RETRY_TASK here would only spin on the lock that dispatch needs to finish. Balance callbacks must run in the context that queued them, so they can only be queued on the CPU's own rq. When dispatching for another rq, run the deferred work directly instead - that rq may consume all its picks through the core-sched fast path and never queue the callback itself. The put_prev_task_scx() warning about a runnable task being left behind assumed that dispatch ran as part of the very pick that is switching away. That now only holds on the non-core path, so gate it and drop the cookie-match test, which is always true without core scheduling, from its condition. The Linux kernel CVE team has assigned CVE-2026-89517 to this issue. Affected and fixed versions =========================== Issue introduced in 6.19 with commit 4c95380701f58b8112f0b891de8d160e4199e19d and fixed in 7.2.4 with commit cdafb68155bee2d5c4e50c12e4606323e9334e6b Issue introduced in 6.19 with commit 4c95380701f58b8112f0b891de8d160e4199e19d and fixed in 7.3-rc1 with commit d954004205c1a1d3f59ce8482b559266c15600fa 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-89517 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 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/cdafb68155bee2d5c4e50c12e4606323e9334e6b https://git.kernel.org/stable/c/d954004205c1a1d3f59ce8482b559266c15600fa