---
id: "CVE-2026-98865"
kind: "vulnerability"
aliases: ["CVE-2026-98865"]
title: "Linux kernel: sched_ext BPF scheduler can self-deadlock on dequeue"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["bpf", "kernel", "linux", "runtime", "sched-ext"]
not_affected_if: ["default-config", "no-custom-bpf-scheduler"]
published_at: "2026-10-18T16:17:40+00:00"
first_seen_at: "2026-10-23T21:57:17+00:00"
updated_at: "2026-10-25T05:12:49+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-98865", "first_seen_at": "2026-10-23T21:57:17+00:00"}]
---

# Linux kernel: sched_ext BPF scheduler can self-deadlock on dequeue

In the Linux sched_ext framework, the ops.dequeue() callback runs while a user DSQ lock is still held, so a BPF scheduler that locks that same queue from inside the callback deadlocks the kernel. The sources describe a denial-of-service (hang) risk; they do not describe code execution or data exposure.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- `uname -r` to see the running kernel version
- Check whether sched_ext is in use: `grep -i sched_ext /boot/config-$(uname -r)` and look for CONFIG_SCHED_CLASS_EXT=y
- Check whether a BPF sched_ext scheduler is loaded: `bpftool struct show` or `ls /sys/kernel/sched_ext`

## Fix

- Move to a Linux kernel release that contains the upstream sched_ext fix for this CVE (exact fixed version: unknown in the sources)
- Until patched, avoid loading BPF schedulers that iterate user DSQs from ops.dequeue() (unknown from sources)

## Timeline

- 2026-10-23T21:57:17+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-98865

## From the sources

In the Linux kernel, the following vulnerability has been resolved:

sched_ext: Don't run ops.dequeue() with a DSQ lock held

ops.dequeue() is invoked with the source user DSQ's lock still held on
the consume and move paths (scx_consume_dispatch_q(),
move_task_between_dsqs()). A BPF scheduler which locks the source user
DSQ from ops.dequeue() - e.g. by iterating it with bpf_iter_scx_dsq -
self-deadlocks.

ops.dequeue() can only call the "any" kfuncs and none of them can lock a
builtin DSQ, so the global and bypass paths can't deadlock; however,
all DSQ locks share one lockdep class, so iterating any user DSQ from
ops.dequeue() on those paths trips the recursion check.

Move the invocation after the DSQ unlock on all three paths.
SCX_TASK_IN_CUSTODY is cleared under the lock serializing the transfer
so that the callback is invoked exactly once.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
