CVE-2025-38012: sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator

Published Jun 18, 2025
·
Updated

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

schedext: bpfiterscxdsqnew() should always initialize iterator

BPF programs may call next() and destroy() on BPF iterators even after new() returns an error value (e.g. bpfforeach() macro ignores error returns from new()). bpfiterscxdsqnew() could leave the iterator in an uninitialized state after an error return causing bpfiterscxdsqnext() to dereference garbage data. Make bpfiterscxdsqnew() always clear $kit->dsq so that next() and destroy() become noops.

Affected Software

9 affected components
Linux Linux kernel
Linux Linux kernel>=6.12<6.12.30
Linux Linux kernel>=6.13<6.14.8
Linux Linux kernel=6.15-rc1
Linux Linux kernel=6.15-rc2
Linux Linux kernel=6.15-rc3
Linux Linux kernel=6.15-rc4
Linux Linux kernel=6.15-rc5
Linux Linux kernel=6.15-rc6

Event History

Jun 18, 2025
CVE Published
via MITRE·09:28 AM
Data Sourced
via MITRE·09:28 AM
DescriptionSeverity
Data Sourced
via NVD·10:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What level of access does an attacker need to exploit this issue?

The vulnerability is rated with local attack vector and low privileges required. No user interaction is required.

2

What program behavior triggers the vulnerable path?

A BPF program must use the sched_ext dispatch-queue iterator and call next() or destroy() after the iterator's new() operation returns an error. The affected implementation could then dereference uninitialized iterator state.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203