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

High 7.8 Published Updated

A flaw in the Linux kernel's sched_ext BPF iterator allows dereferencing uninitialized data, potentially causing a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-38012?

CVE-2025-38012 is a high-severity vulnerability in Linux kernel, published on 18 Jun 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-908

Which versions are affected by CVE-2025-38012?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-38012?

Apply the vendor's patch.

Is CVE-2025-38012 being exploited?

There is no known exploitation of CVE-2025-38012 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-38012, DEBIAN-CVE-2025-38012, GHSA-99r2-xh56-23cv, UBUNTU-CVE-2025-38012.

Is CVE-2025-38012 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free