{"api_version":"1","generated_at":"2026-05-06T12:24:26+00:00","cve":"CVE-2026-31733","urls":{"html":"https://cve.report/CVE-2026-31733","api":"https://cve.report/api/cve/CVE-2026-31733.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-31733","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-31733"},"summary":{"title":"sched_ext: Fix stale direct dispatch state in ddsp_dsq_id","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsched_ext: Fix stale direct dispatch state in ddsp_dsq_id\n\n@p->scx.ddsp_dsq_id can be left set (non-SCX_DSQ_INVALID) triggering a\nspurious warning in mark_direct_dispatch() when the next wakeup's\nops.select_cpu() calls scx_bpf_dsq_insert(), such as:\n\n WARNING: kernel/sched/ext.c:1273 at scx_dsq_insert_commit+0xcd/0x140\n\nThe root cause is that ddsp_dsq_id was only cleared in dispatch_enqueue(),\nwhich is not reached in all paths that consume or cancel a direct dispatch\nverdict.\n\nFix it by clearing it at the right places:\n\n - direct_dispatch(): cache the direct dispatch state in local variables\n   and clear it before dispatch_enqueue() on the synchronous path. For\n   the deferred path, the direct dispatch state must remain set until\n   process_ddsp_deferred_locals() consumes them.\n\n - process_ddsp_deferred_locals(): cache the dispatch state in local\n   variables and clear it before calling dispatch_to_local_dsq(), which\n   may migrate the task to another rq.\n\n - do_enqueue_task(): clear the dispatch state on the enqueue path\n   (local/global/bypass fallbacks), where the direct dispatch verdict is\n   ignored.\n\n - dequeue_task_scx(): clear the dispatch state after dispatch_dequeue()\n   to handle both the deferred dispatch cancellation and the holding_cpu\n   race, covering all cases where a pending direct dispatch is\n   cancelled.\n\n - scx_disable_task(): clear the direct dispatch state when\n   transitioning a task out of the current scheduler. Waking tasks may\n   have had the direct dispatch state set by the outgoing scheduler's\n   ops.select_cpu() and then been queued on a wake_list via\n   ttwu_queue_wakelist(), when SCX_OPS_ALLOW_QUEUED_WAKEUP is set. Such\n   tasks are not on the runqueue and are not iterated by scx_bypass(),\n   so their direct dispatch state won't be cleared. Without this clear,\n   any subsequent SCX scheduler that tries to direct dispatch the task\n   will trigger the WARN_ON_ONCE() in mark_direct_dispatch().","state":"PUBLISHED","assigner":"Linux","published_at":"2026-05-01 15:16:35","updated_at":"2026-05-01 15:24:14"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/7ea601daa0153e19cd1c6e6b300348c70c05fe77","name":"https://git.kernel.org/stable/c/7ea601daa0153e19cd1c6e6b300348c70c05fe77","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/7e0ffb72de8aa3b25989c2d980e81b829c577010","name":"https://git.kernel.org/stable/c/7e0ffb72de8aa3b25989c2d980e81b829c577010","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5e7b2cc8fae9ec2a5bc53311191d2faaff75a4b5","name":"https://git.kernel.org/stable/c/5e7b2cc8fae9ec2a5bc53311191d2faaff75a4b5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ca685511f7afd42cdcbb0feea42e5d332d384251","name":"https://git.kernel.org/stable/c/ca685511f7afd42cdcbb0feea42e5d332d384251","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-31733","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31733","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5b26f7b920f76b2b9cc398c252a9e35e44bf5bb9 ca685511f7afd42cdcbb0feea42e5d332d384251 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5b26f7b920f76b2b9cc398c252a9e35e44bf5bb9 5e7b2cc8fae9ec2a5bc53311191d2faaff75a4b5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5b26f7b920f76b2b9cc398c252a9e35e44bf5bb9 7ea601daa0153e19cd1c6e6b300348c70c05fe77 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5b26f7b920f76b2b9cc398c252a9e35e44bf5bb9 7e0ffb72de8aa3b25989c2d980e81b829c577010 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.82 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.22 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19.12 6.19.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"31733","cve":"CVE-2026-31733","epss":"0.000180000","percentile":"0.046430000","score_date":"2026-05-05","updated_at":"2026-05-06 00:08:10"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["kernel/sched/ext.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"ca685511f7afd42cdcbb0feea42e5d332d384251","status":"affected","version":"5b26f7b920f76b2b9cc398c252a9e35e44bf5bb9","versionType":"git"},{"lessThan":"5e7b2cc8fae9ec2a5bc53311191d2faaff75a4b5","status":"affected","version":"5b26f7b920f76b2b9cc398c252a9e35e44bf5bb9","versionType":"git"},{"lessThan":"7ea601daa0153e19cd1c6e6b300348c70c05fe77","status":"affected","version":"5b26f7b920f76b2b9cc398c252a9e35e44bf5bb9","versionType":"git"},{"lessThan":"7e0ffb72de8aa3b25989c2d980e81b829c577010","status":"affected","version":"5b26f7b920f76b2b9cc398c252a9e35e44bf5bb9","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["kernel/sched/ext.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.12"},{"lessThan":"6.12","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.82","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.22","versionType":"semver"},{"lessThanOrEqual":"6.19.*","status":"unaffected","version":"6.19.12","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.0","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.82","versionStartIncluding":"6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.22","versionStartIncluding":"6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.19.12","versionStartIncluding":"6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0","versionStartIncluding":"6.12","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsched_ext: Fix stale direct dispatch state in ddsp_dsq_id\n\n@p->scx.ddsp_dsq_id can be left set (non-SCX_DSQ_INVALID) triggering a\nspurious warning in mark_direct_dispatch() when the next wakeup's\nops.select_cpu() calls scx_bpf_dsq_insert(), such as:\n\n WARNING: kernel/sched/ext.c:1273 at scx_dsq_insert_commit+0xcd/0x140\n\nThe root cause is that ddsp_dsq_id was only cleared in dispatch_enqueue(),\nwhich is not reached in all paths that consume or cancel a direct dispatch\nverdict.\n\nFix it by clearing it at the right places:\n\n - direct_dispatch(): cache the direct dispatch state in local variables\n   and clear it before dispatch_enqueue() on the synchronous path. For\n   the deferred path, the direct dispatch state must remain set until\n   process_ddsp_deferred_locals() consumes them.\n\n - process_ddsp_deferred_locals(): cache the dispatch state in local\n   variables and clear it before calling dispatch_to_local_dsq(), which\n   may migrate the task to another rq.\n\n - do_enqueue_task(): clear the dispatch state on the enqueue path\n   (local/global/bypass fallbacks), where the direct dispatch verdict is\n   ignored.\n\n - dequeue_task_scx(): clear the dispatch state after dispatch_dequeue()\n   to handle both the deferred dispatch cancellation and the holding_cpu\n   race, covering all cases where a pending direct dispatch is\n   cancelled.\n\n - scx_disable_task(): clear the direct dispatch state when\n   transitioning a task out of the current scheduler. Waking tasks may\n   have had the direct dispatch state set by the outgoing scheduler's\n   ops.select_cpu() and then been queued on a wake_list via\n   ttwu_queue_wakelist(), when SCX_OPS_ALLOW_QUEUED_WAKEUP is set. Such\n   tasks are not on the runqueue and are not iterated by scx_bypass(),\n   so their direct dispatch state won't be cleared. Without this clear,\n   any subsequent SCX scheduler that tries to direct dispatch the task\n   will trigger the WARN_ON_ONCE() in mark_direct_dispatch()."}],"providerMetadata":{"dateUpdated":"2026-05-01T14:14:31.558Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/ca685511f7afd42cdcbb0feea42e5d332d384251"},{"url":"https://git.kernel.org/stable/c/5e7b2cc8fae9ec2a5bc53311191d2faaff75a4b5"},{"url":"https://git.kernel.org/stable/c/7ea601daa0153e19cd1c6e6b300348c70c05fe77"},{"url":"https://git.kernel.org/stable/c/7e0ffb72de8aa3b25989c2d980e81b829c577010"}],"title":"sched_ext: Fix stale direct dispatch state in ddsp_dsq_id","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-31733","datePublished":"2026-05-01T14:14:31.558Z","dateReserved":"2026-03-09T15:48:24.137Z","dateUpdated":"2026-05-01T14:14:31.558Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-05-01 15:16:35","lastModifiedDate":"2026-05-01 15:24:14","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"31733","Ordinal":"1","Title":"sched_ext: Fix stale direct dispatch state in ddsp_dsq_id","CVE":"CVE-2026-31733","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"31733","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nsched_ext: Fix stale direct dispatch state in ddsp_dsq_id\n\n@p->scx.ddsp_dsq_id can be left set (non-SCX_DSQ_INVALID) triggering a\nspurious warning in mark_direct_dispatch() when the next wakeup's\nops.select_cpu() calls scx_bpf_dsq_insert(), such as:\n\n WARNING: kernel/sched/ext.c:1273 at scx_dsq_insert_commit+0xcd/0x140\n\nThe root cause is that ddsp_dsq_id was only cleared in dispatch_enqueue(),\nwhich is not reached in all paths that consume or cancel a direct dispatch\nverdict.\n\nFix it by clearing it at the right places:\n\n - direct_dispatch(): cache the direct dispatch state in local variables\n   and clear it before dispatch_enqueue() on the synchronous path. For\n   the deferred path, the direct dispatch state must remain set until\n   process_ddsp_deferred_locals() consumes them.\n\n - process_ddsp_deferred_locals(): cache the dispatch state in local\n   variables and clear it before calling dispatch_to_local_dsq(), which\n   may migrate the task to another rq.\n\n - do_enqueue_task(): clear the dispatch state on the enqueue path\n   (local/global/bypass fallbacks), where the direct dispatch verdict is\n   ignored.\n\n - dequeue_task_scx(): clear the dispatch state after dispatch_dequeue()\n   to handle both the deferred dispatch cancellation and the holding_cpu\n   race, covering all cases where a pending direct dispatch is\n   cancelled.\n\n - scx_disable_task(): clear the direct dispatch state when\n   transitioning a task out of the current scheduler. Waking tasks may\n   have had the direct dispatch state set by the outgoing scheduler's\n   ops.select_cpu() and then been queued on a wake_list via\n   ttwu_queue_wakelist(), when SCX_OPS_ALLOW_QUEUED_WAKEUP is set. Such\n   tasks are not on the runqueue and are not iterated by scx_bypass(),\n   so their direct dispatch state won't be cleared. Without this clear,\n   any subsequent SCX scheduler that tries to direct dispatch the task\n   will trigger the WARN_ON_ONCE() in mark_direct_dispatch().","Type":"Description","Title":"sched_ext: Fix stale direct dispatch state in ddsp_dsq_id"}]}}}