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

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2025-06-18T09:28:22.057Z
- Modified: 2026-08-05T11:58:57.764Z
- Weaknesses: CWE-908
- Assigned by: Linux

## Description

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

sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator

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

(As written by CVE List.)

## Affected

- Linux Linux: from 650ba21b131ed1f8ee57826b2c6295a3be221132 before 0102989af4c334d1d98b2a0fd4d61a5152e39b72; from 650ba21b131ed1f8ee57826b2c6295a3be221132 before 255dd31bfc4a67a19b1fc2cd130a50284dadfe3a; from 650ba21b131ed1f8ee57826b2c6295a3be221132 before 428dc9fc0873989d73918d4a9cc22745b7bbc799; 6.12 (not affected: before 6.12; from 6.12.30 up to 6.12.*; from 6.14.8 up to 6.14.*; from 6.15 up to *)
- linux linux_kernel: from 6.12 before 6.12.30; from 6.13 before 6.14.8; 6.15

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/0102989af4c334d1d98b2a0fd4d61a5152e39b72> (patch)
- <https://git.kernel.org/stable/c/255dd31bfc4a67a19b1fc2cd130a50284dadfe3a> (patch)
- <https://git.kernel.org/stable/c/428dc9fc0873989d73918d4a9cc22745b7bbc799> (patch)

## Sources

- CVE List: [CVE-2025-38012](https://www.cve.org/CVERecord?id=CVE-2025-38012), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-38012](https://nvd.nist.gov/vuln/detail/CVE-2025-38012), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-38012 · Whole record: https://cve.day/CVE-2025-38012.json · Rebuilt by cve.day 2026-11-25T22:58:59.337Z
