CVE-2025-38012
JSON

7.8high

sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.30% (higher than 14% of CVEs; EPSS, by FIRST)
Published
Last changed
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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 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 *
CVE List
linux linux_kernelfrom 6.12 before 6.12.30, from 6.13 before 6.14.8, 6.15NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: sched_ext: bpf_iter_scx_dsq_new() siempre debe inicializar el iterador. Los programas BPF pueden llamar a next() y destroy() en iteradores BPF incluso después de que new() devuelva un valor de error (p. ej., la macro bpf_for_each() ignora los errores devueltos por new()). bpf_iter_scx_dsq_new() podría dejar el iterador sin inicializar después de un error, lo que provoca que bpf_iter_scx_dsq_next() desreferencia datos innecesarios. Asegúrese de que bpf_iter_scx_dsq_new() siempre borre $kit->dsq para que next() y destroy() se conviertan en noops.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-38012 changed 2026-08-05CVE Terms of Use
NVDCVE-2025-38012 changed 2026-07-30Public domain