FKIE_CVE-2026-98220
Vulnerability from fkie_nvd - Published: 2026-10-06 09:18 - Updated: 2026-10-06 09:18
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved:
sched_ext: Fix NULL sched deref in kfunc sub-sched error paths
When the root scheduler has sub-scheds attached, the COMPAT kfunc
wrappers scx_bpf_select_cpu_and() and scx_bpf_dsq_insert_vtime() refuse
the call and report to @p's scheduler:
scx_error(scx_task_sched(p), "... must be used");
The wrappers are reachable with tasks that have no scheduler.
scx_bpf_select_cpu_and() is in the select_cpu kfunc group, which
scx_kfunc_context_filter() opens to BPF_PROG_TYPE_SYSCALL programs;
scx_bpf_dsq_insert_vtime() is in the enqueue_dispatch group, which
ops.enqueue() and ops.dispatch() may call with any KF_RCU task -- the
group has no kf_tasks validation, and scx_dsq_insert_preamble() checks
task ownership with scx_task_on_sched() precisely because @p may be an
arbitrary task.
scx_task_sched(p) is p->scx.sched, which is NULL for tasks past
sched_ext_dead() -- which clears it via scx_disable_and_exit_task() on
exit -- and for idle tasks, which the enable paths skip as they are
never scheduled through SCX. It is also an rcu_dereference_protected()
that expects @p's pi_lock or rq lock, which neither wrapper holds.
Passing NULL to scx_error() reaches scx_vexit(), which dereferences
sch->exit_info, oopsing the kernel.
One concrete trigger exercised while developing the fix: a
BPF_PROG_TYPE_SYSCALL program calling the select_cpu_and wrapper on an
exited-but-not-reaped task while a sub-scheduler was attached (its pid
stays findable while the zombie is unreaped; faulting instruction is
the scx_vexit() prologue "mov r15,[rdi+0x398]" with RDI=NULL and 0x398
the offset of sch->exit_info):
sched_ext: BPF scheduler "kfunc_subsched_null" enabled
sched_ext: BPF sub-scheduler "kfunc_subsched_null" enabled
sched_ext: Unassociated program run_select_cpu_ (id 76)
BUG: kernel NULL pointer dereference, address: 0000000000000398
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
Oops: Oops: 0000 [#1] SMP NOPTI
CPU: 7 UID: 0 PID: 8201 Comm: kfunc_test_runn Tainted: G W
RIP: 0010:scx_vexit+0x25/0xa0
Code: ... <4c> 8b bf 98 03 00 00 ...
CR2: 0000000000000398
Call Trace:
<TASK>
__scx_exit+0x4f/0x70
scx_bpf_select_cpu_and+0xab/0xb0
bpf_prog_430ed61a7b66e03a_run_select_cpu_and+0x9c/0xe7
? __x64_sys_bpf+0x2c/0x40
bpf_prog_test_run_syscall+0x130/0x2f0
__sys_bpf+0x930/0x10d0
? __x64_sys_bpf+0x2c/0x40
__x64_sys_bpf+0x2c/0x40
do_syscall_64+0xbc/0x460
entry_SYSCALL_64_after_hwframe+0x76/0x7e
</TASK>
Read @p's scheduler under RCU instead, which the wrappers can do from
their guard(rcu)(): fault it when it can be determined, and when it
can't be determined -- @p is a task past sched_ext_dead() or an idle
task -- there is nothing obviously wrong to report, so just refuse the
call as before without faulting any scheduler.
These COMPAT wrappers are scheduled for eventual removal once the
deprecation grace period elapses, but until then -- and regardless of
their removal timeline -- they must not oops the kernel on a task they
are handed.
References
Impacted products
| Vendor | Product | Version |
|---|
{
"affected": [
{
"affectedData": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"kernel/sched/ext/ext.c",
"kernel/sched/ext/idle.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "589f0945bf3ebf0790fd51e28c7f0d04ed3d8b78",
"status": "affected",
"version": "a5fa0708cbfda4d3c2c6a447de7c4b0b23595527",
"versionType": "git"
},
{
"lessThan": "0a85182723b65ad8bee8131bc38fcf0347d6679b",
"status": "affected",
"version": "a5fa0708cbfda4d3c2c6a447de7c4b0b23595527",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"kernel/sched/ext/ext.c",
"kernel/sched/ext/idle.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "7.1"
},
{
"lessThan": "7.1",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "7.2.*",
"status": "unaffected",
"version": "7.2.8",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "7.3-rc4",
"versionType": "original_commit_for_fix"
}
]
}
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsched_ext: Fix NULL sched deref in kfunc sub-sched error paths\n\nWhen the root scheduler has sub-scheds attached, the COMPAT kfunc\nwrappers scx_bpf_select_cpu_and() and scx_bpf_dsq_insert_vtime() refuse\nthe call and report to @p\u0027s scheduler:\n\n\tscx_error(scx_task_sched(p), \"... must be used\");\n\nThe wrappers are reachable with tasks that have no scheduler.\nscx_bpf_select_cpu_and() is in the select_cpu kfunc group, which\nscx_kfunc_context_filter() opens to BPF_PROG_TYPE_SYSCALL programs;\nscx_bpf_dsq_insert_vtime() is in the enqueue_dispatch group, which\nops.enqueue() and ops.dispatch() may call with any KF_RCU task -- the\ngroup has no kf_tasks validation, and scx_dsq_insert_preamble() checks\ntask ownership with scx_task_on_sched() precisely because @p may be an\narbitrary task.\n\nscx_task_sched(p) is p-\u003escx.sched, which is NULL for tasks past\nsched_ext_dead() -- which clears it via scx_disable_and_exit_task() on\nexit -- and for idle tasks, which the enable paths skip as they are\nnever scheduled through SCX. It is also an rcu_dereference_protected()\nthat expects @p\u0027s pi_lock or rq lock, which neither wrapper holds.\nPassing NULL to scx_error() reaches scx_vexit(), which dereferences\nsch-\u003eexit_info, oopsing the kernel.\n\nOne concrete trigger exercised while developing the fix: a\nBPF_PROG_TYPE_SYSCALL program calling the select_cpu_and wrapper on an\nexited-but-not-reaped task while a sub-scheduler was attached (its pid\nstays findable while the zombie is unreaped; faulting instruction is\nthe scx_vexit() prologue \"mov r15,[rdi+0x398]\" with RDI=NULL and 0x398\nthe offset of sch-\u003eexit_info):\n\n sched_ext: BPF scheduler \"kfunc_subsched_null\" enabled\n sched_ext: BPF sub-scheduler \"kfunc_subsched_null\" enabled\n sched_ext: Unassociated program run_select_cpu_ (id 76)\n BUG: kernel NULL pointer dereference, address: 0000000000000398\n #PF: supervisor read access in kernel mode\n #PF: error_code(0x0000) - not-present page\n Oops: Oops: 0000 [#1] SMP NOPTI\n CPU: 7 UID: 0 PID: 8201 Comm: kfunc_test_runn Tainted: G W\n RIP: 0010:scx_vexit+0x25/0xa0\n Code: ... \u003c4c\u003e 8b bf 98 03 00 00 ...\n CR2: 0000000000000398\n Call Trace:\n \u003cTASK\u003e\n __scx_exit+0x4f/0x70\n scx_bpf_select_cpu_and+0xab/0xb0\n bpf_prog_430ed61a7b66e03a_run_select_cpu_and+0x9c/0xe7\n ? __x64_sys_bpf+0x2c/0x40\n bpf_prog_test_run_syscall+0x130/0x2f0\n __sys_bpf+0x930/0x10d0\n ? __x64_sys_bpf+0x2c/0x40\n __x64_sys_bpf+0x2c/0x40\n do_syscall_64+0xbc/0x460\n entry_SYSCALL_64_after_hwframe+0x76/0x7e\n \u003c/TASK\u003e\n\nRead @p\u0027s scheduler under RCU instead, which the wrappers can do from\ntheir guard(rcu)(): fault it when it can be determined, and when it\ncan\u0027t be determined -- @p is a task past sched_ext_dead() or an idle\ntask -- there is nothing obviously wrong to report, so just refuse the\ncall as before without faulting any scheduler.\n\nThese COMPAT wrappers are scheduled for eventual removal once the\ndeprecation grace period elapses, but until then -- and regardless of\ntheir removal timeline -- they must not oops the kernel on a task they\nare handed."
}
],
"id": "CVE-2026-98220",
"lastModified": "2026-10-06T09:18:08.857",
"metrics": {},
"published": "2026-10-06T09:18:08.857",
"references": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/0a85182723b65ad8bee8131bc38fcf0347d6679b"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/589f0945bf3ebf0790fd51e28c7f0d04ed3d8b78"
}
],
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"vulnStatus": "Received"
}
Loading…
Loading…
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
Loading…
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Loading…
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.