{"id":"CVE-2026-74731","state":"PUBLISHED","title":"sched_ext: Skip sub-disable teardown for never-linked sub-schedulers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsched_ext: Skip sub-disable teardown for never-linked sub-schedulers\n\nA sub-scheduler enable can fail before scx_link_sched() links the sched into\nthe hierarchy, e.g. when the parent is already being disabled, and cleanup\nstill runs the full scx_sub_disable().\n\nThat is racy against root disable: drain_descendants() is the only ordering\nbetween a sub's disable-time task walk and root disable's all-task teardown,\nand an unlinked sub is invisible to it. Root's teardown can thus run between\nthe never-linked sub's drain and its walk, exiting every task to no\nscheduler.\n\nThe walk then trips the membership WARN and re-homes the exited tasks onto\nthe dying hierarchy, a use-after-free.\n\nSkip the cgroup ownership reset and the task walk if @sch was never linked,\nindicated by the empty ->sibling as unlinking only happens later in the same\nfunction. The membership WARN remains valid: a linked sub is always waited\non by an ancestor's drain.","publishedAt":"2026-08-22T15:33:20.294Z","updatedAt":"2026-08-25T05:42:10.750Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"337ec00b1d9c676f637651c2cefddb8612b867ee","status":"affected","lessThan":"6428093a4a986c38c9089b5eb32b56d914ef437a","versionType":"git"},{"version":"337ec00b1d9c676f637651c2cefddb8612b867ee","status":"affected","lessThan":"8c13364db9c9a43ed286f3a8d0fb9477b1adc43c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/sched/ext/ext.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.1.9","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/sched/ext/ext.c"]}],"references":["https://git.kernel.org/stable/c/6428093a4a986c38c9089b5eb32b56d914ef437a","https://git.kernel.org/stable/c/8c13364db9c9a43ed286f3a8d0fb9477b1adc43c"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:58.252Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/74xxx/CVE-2026-74731.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-74731","state":"PUBLISHED","datePublished":"2026-08-22T15:33:20.294Z","dateUpdated":"2026-08-25T05:42:10.750Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-08-15T05:44:03.930Z"},"containers":{"cna":{"title":"sched_ext: Skip sub-disable teardown for never-linked sub-schedulers","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsched_ext: Skip sub-disable teardown for never-linked sub-schedulers\n\nA sub-scheduler enable can fail before scx_link_sched() links the sched into\nthe hierarchy, e.g. when the parent is already being disabled, and cleanup\nstill runs the full scx_sub_disable().\n\nThat is racy against root disable: drain_descendants() is the only ordering\nbetween a sub's disable-time task walk and root disable's all-task teardown,\nand an unlinked sub is invisible to it. Root's teardown can thus run between\nthe never-linked sub's drain and its walk, exiting every task to no\nscheduler.\n\nThe walk then trips the membership WARN and re-homes the exited tasks onto\nthe dying hierarchy, a use-after-free.\n\nSkip the cgroup ownership reset and the task walk if @sch was never linked,\nindicated by the empty ->sibling as unlinking only happens later in the same\nfunction. The membership WARN remains valid: a linked sub is always waited\non by an ancestor's drain."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"337ec00b1d9c676f637651c2cefddb8612b867ee","status":"affected","lessThan":"6428093a4a986c38c9089b5eb32b56d914ef437a","versionType":"git"},{"version":"337ec00b1d9c676f637651c2cefddb8612b867ee","status":"affected","lessThan":"8c13364db9c9a43ed286f3a8d0fb9477b1adc43c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/sched/ext/ext.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.1.9","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/sched/ext/ext.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6428093a4a986c38c9089b5eb32b56d914ef437a"},{"url":"https://git.kernel.org/stable/c/8c13364db9c9a43ed286f3a8d0fb9477b1adc43c"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is reached only via local bpf(2) syscalls (BPF_MAP_CREATE/UPDATE_ELEM, BPF_PROG_LOAD, BPF_LINK_CREATE) that register sched_ext_ops struct_ops and invoke scx_enable()/scx_sub_enable_workfn(); per kernel CNA guidance BPF/sched_ext is Local, not network-reachable.\nAC:L - The attacker controls both sides of the race by concurrently attaching a sub-scheduler and closing the root BPF link to trigger scx_root_disable() while never-linked sub cleanup runs scx_sub_disable(); repeated attempts can reliably hit the window between drain_descendants() and the task walk.\nPR:L - Exploitation requires CAP_BPF to create BPF_MAP_TYPE_STRUCT_OPS, load BPF_PROG_TYPE_STRUCT_OPS, and BPF_LINK_CREATE sched_ext; per kernel guidance this is Low because CAP_BPF is obtainable via user namespaces/BPF tokens, not init-namespace root only.\nUI:N - No victim interaction is required; the attacker loads root and sub BPF schedulers, targets their cgroup, and closes BPF links from their own processes to orchestrate the concurrent enable-failure and teardown race.\nS:U - The use-after-free corrupts kernel scheduler/task state during sched_ext teardown on the same host kernel; this is standard kernel memory corruption and privilege escalation impact, not a VM escape or cross-security-authority boundary.\nC:H - Failed never-linked sub cleanup re-homes tasks onto a dying scx_sched hierarchy after root disable frees scheduler state; this use-after-free on scheduler/task metadata can be leveraged for arbitrary kernel memory disclosure per kernel UAF guidance.\nI:H - The UAF during scx_set_task_sched()/scx_enable_task() on a freed scx_sched corrupts scheduler pointers and task ownership in the system-wide scheduler path, enabling heap corruption and arbitrary kernel write or code execution primitives.\nA:H - The race re-homes tasks onto a tearing-down sched_ext hierarchy, tripping membership WARNs and corrupting scheduler teardown; this causes kernel oops/panic/hang on a system-wide scheduler subsystem, which is High availability impact per kernel guidance."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-25T05:42:10.750Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.1.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}