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=1792758334; b=yWSO+wsrT0JFCLLLxD1Wlu+1130z4f+XpJawStPsflB3H0Lqki7tG83OCLDpcIxCoWNQ Ow1YRK25+yUSHnWPKyJe2H4sP2Bcduogqs53kZWw8vGm5BKMyf+3brrFn09/dap/GXVju DsVRSNaEZPiy+DAf097mw6wG6znggX/IXqVeQ1JlnDmTJJX7+aOk+Lqc0QwZDcmhn+4ta z6e3mlMUKQX/YFYc2tbsl5D7tPkRVPyr7+WmKnPOnJJVoumNZKdAXmJEzvKdD9lGkRWVR nGlFKEmS+AZYniU8DANi7Y3mGFXLsdG6ueDLoJFDF8AQo7D1wvZnY59+TOawh3cTWaw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792758334; 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=eeUeRA8XIwPZXCd3rGwqgt2QS9SfxI/LumtWArrdRp0=; b=mFdJ1wJEcAJWJlrTiEqFL5Fnr+zy7r19DPhLBxFqJfY8AnvAHKvt/7WI53+krMFzd1Xj 4HBArvK95gDIu2LIgwWfD/djdkTrgY1BjzuLq2qgVVtwR/t/jUsQbOMimidYyEmX8wKsG jtnJ0Y5kplMJXwGr2mq+JkRZKD8mjOGZoKQtdXLfUHwboz558JoGsq0OUB3oPRJBjzBGw DRdiGsecsue+apZ8arBmw1h+DO1J4g5gMA13Dyf+lhHoOYWbghGBlLUa4SisKLvXGtZhv IpKCEB8lTG3djEOfH5xopZdhwwKskoJ2fqoYqkIqy75coTesIKH0ywtpFDfvn2Zqtlw== 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=J9qeG60z; 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 98FA4606A31A for ; Fri, 23 Oct 2026 12:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=J9qeG60z Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B5561F01825; Fri, 23 Oct 2026 12:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792758334; bh=eeUeRA8XIwPZXCd3rGwqgt2QS9SfxI/LumtWArrdRp0=; h=From:To:Cc:Subject:Date:Reply-To; b=J9qeG60zSrf+lKU21z2KRjaQ/U+CLpXbb40mGN2PM7l1hlJDCFKQJF7eSpmzq3BmZ M9bcdaEZTFXVLKTuVCpkzViybNnjRZlzm5qjnmNl8EB1lTx4bjKXK3jyjSss4n55np rWA/6FCkT3Wsxtlv/iwTnsZzQ8rv4Id7o/j8wUSo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98942: sched_ext: Build the cid tables privately and publish them with RCU Date: Fri, 23 Oct 2026 14:11:49 +0200 Message-ID: <2026102339-CVE-2026-98942-a666@gregkh> X-Mailer: git-send-email 2.56.0 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=3262; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=12HxjQ5Fn4YjkW2V/7me1C30BKuYeKQjX0/8he09BI8=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm3/f6Y1Wyb/jklv1Z6mdhxJ/aphVdXa7moHJ22hCO59 /PyFQ97O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiTd8ZFixYUFNrL+tnP6si +Xu1nd42rnuh7xjmKR+/GXsxvbZd0jr6Rchuadv9/dvWAgA= 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: Build the cid tables privately and publish them with RCU The cid tables are visible to the cid kfuncs while being modified: the first enable publishes the global pointers before filling them, ops.init_cids() overrides rewrite them in place, and re-enables rebuild them in place. A racing TRACING or SYSCALL program can read unfilled entries, including uninitialized memory in the kmalloc'd tables, or torn topo updates. Tie the tables' lifetimes to the root sched instead: each root enable builds a fresh set privately and publishes the per-table __rcu globals once the layout is final, and root disable unpublishes and RCU-frees the set. A non-NULL global is now always a fully built table which stays valid for the reader's RCU read section, and lookups stay two loads. Kfuncs treat NULL as no-mapping, also after the scheduler exits instead of reporting the stale last mapping. The cid kfuncs are available whether the root scheduler is cid-form or cpu-form, the latter to allow gradual migration to cids. Every root therefore builds and publishes a default mapping. Every reader must either be gated on scheduler liveness or NULL-check inside an RCU read section. Fix the two kfuncs that were neither: scx_bpf_this_cid() read the table with no RCU or preemption protection and scx_bpf_task_cid() relied on KF_RCU, which doesn't put a sleepable program in an RCU read section. The hotplug callbacks are instead serialized by retiring the tables inside the cpus_read_lock() section that clears scx_root. v2: Document why every root builds the tables (desc + cid.c comment). The Linux kernel CVE team has assigned CVE-2026-98942 to this issue. Affected and fixed versions =========================== Fixed in 7.2.10 with commit 0e1a74369bdbc357d3d9713734418d914a981553 Fixed in 7.3 with commit 3a773220d39ba993dfe5d135f8b610be10794d5d 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-98942 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/cid.c kernel/sched/ext/cid.h kernel/sched/ext/ext.c kernel/sched/ext/internal.h kernel/sched/ext/sub.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/0e1a74369bdbc357d3d9713734418d914a981553 https://git.kernel.org/stable/c/3a773220d39ba993dfe5d135f8b610be10794d5d