{"id":33289,"date":"2026-10-06T20:31:42","date_gmt":"2026-10-06T12:31:42","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98220"},"modified":"2026-10-06T20:31:42","modified_gmt":"2026-10-06T12:31:42","slug":"cve-2026-98220","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98220","title":{"rendered":"CVE-2026-98220 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nsched_ext: Fix NULL s"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>sched_ext: Fix NULL sched deref in kfunc sub-sched error paths<\/p>\n<p>When the root scheduler has sub-scheds attached, the COMPAT kfunc<br \/>\nwrappers scx_bpf_select_cpu_and() and scx_bpf_dsq_insert_vtime() refuse<br \/>\nthe call and report to @p&#8217;s scheduler:<\/p>\n<p>\tscx_error(scx_task_sched(p), &#8220;&#8230; must be used&#8221;);<\/p>\n<p>The wrappers are reachable with tasks that have no scheduler.<br \/>\nscx_bpf_select_cpu_and() is in the select_cpu kfunc group, which<br \/>\nscx_kfunc_context_filter() opens to BPF_PROG_TYPE_SYSCALL programs;<br \/>\nscx_bpf_dsq_insert_vtime() is in the enqueue_dispatch group, which<br \/>\nops.enqueue() and ops.dispatch() may call with any KF_RCU task &#8212; the<br \/>\ngroup has no kf_tasks validation, and scx_dsq_insert_preamble() checks<br \/>\ntask ownership with scx_task_on_sched() precisely because @p may be an<br \/>\narbitrary task.<\/p>\n<p>scx_task_sched(p) is p-&gt;scx.sched, which is NULL for tasks past<br \/>\nsched_ext_dead() &#8212; which clears it via scx_disable_and_exit_task() on<br \/>\nexit &#8212; and for idle tasks, which the enable paths skip as they are<br \/>\nnever scheduled through SCX. It is also an rcu_dereference_protected()<br \/>\nthat expects @p&#8217;s pi_lock or rq lock, which neither wrapper holds.<br \/>\nPassing NULL to scx_error() reaches scx_vexit(), which dereferences<br \/>\nsch-&gt;exit_info, oopsing the kernel.<\/p>\n<p>One concrete trigger exercised while developing the fix: a<br \/>\nBPF_PROG_TYPE_SYSCALL program calling the select_cpu_and wrapper on an<br \/>\nexited-but-not-reaped task while a sub-scheduler was attached (its pid<br \/>\nstays findable while the zombie is unreaped; faulting instruction is<br \/>\nthe scx_vexit() prologue &#8220;mov r15,[rdi+0x398]&#8221; with RDI=NULL and 0x398<br \/>\nthe offset of sch-&gt;exit_info):<\/p>\n<p>  sched_ext: BPF scheduler &#8220;kfunc_subsched_null&#8221; enabled<br \/>\n  sched_ext: BPF sub-scheduler &#8220;kfunc_subsched_null&#8221; enabled<br \/>\n  sched_ext: Unassociated program run_select_cpu_ (id 76)<br \/>\n  BUG: kernel NULL pointer dereference, address: 0000000000000398<br \/>\n  #PF: supervisor read access in kernel mode<br \/>\n  #PF: error_code(0x0000) &#8211; not-present page<br \/>\n  Oops: Oops: 0000 [#1] SMP NOPTI<br \/>\n  CPU: 7 UID: 0 PID: 8201 Comm: kfunc_test_runn Tainted: G W<br \/>\n  RIP: 0010:scx_vexit+0x25\/0xa0<br \/>\n  Code: &#8230;  8b bf 98 03 00 00 &#8230;<br \/>\n  CR2: 0000000000000398<br \/>\n  Call Trace:<\/p>\n<p>   __scx_exit+0x4f\/0x70<br \/>\n   scx_bpf_select_cpu_and+0xab\/0xb0<br \/>\n   bpf_prog_430ed61a7b66e03a_run_select_cpu_and+0x9c\/0xe7<br \/>\n   ? __x64_sys_bpf+0x2c\/0x40<br \/>\n   bpf_prog_test_run_syscall+0x130\/0x2f0<br \/>\n   __sys_bpf+0x930\/0x10d0<br \/>\n   ? __x64_sys_bpf+0x2c\/0x40<br \/>\n   __x64_sys_bpf+0x2c\/0x40<br \/>\n   do_syscall_64+0xbc\/0x460<br \/>\n   entry_SYSCALL_64_after_hwframe+0x76\/0x7e<\/p>\n<p>Read @p&#8217;s scheduler under RCU instead, which the wrappers can do from<br \/>\ntheir guard(rcu)(): fault it when it can be determined, and when it<br \/>\ncan&#8217;t be determined &#8212; @p is a task past sched_ext_dead() or an idle<br \/>\ntask &#8212; there is nothing obviously wrong to report, so just refuse the<br \/>\ncall as before without faulting any scheduler.<\/p>\n<p>These COMPAT wrappers are scheduled for eventual removal once the<br \/>\ndeprecation grace period elapses, but until then &#8212; and regardless of<br \/>\ntheir removal timeline &#8212; they must not oops the kernel on a task they<br \/>\nare handed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>sched_ext: Fix NULL sched deref in kfunc sub-sched error paths<\/p>\n<p>When the root scheduler has sub-scheds attached, the COMPAT kfunc<br \/>\nw<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-33289","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/33289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}