# CVE-2025-37821: sched/eevdf: Fix se-\>slice being set to U64\_MAX and resulting crash

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.27% (percentile 13, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2025-05-08T06:26:15.535Z
- **Modified:** 2026-06-17T09:15:30.460Z

## Who should check

- Anyone running Linux \>= aef6987d89544d63a47753cf3741cabff0b5574c, \< 86b37810fa1e40b93171da023070b99ccbb4ea04; \>= aef6987d89544d63a47753cf3741cabff0b5574c, \< 50a665496881262519f115f1bfe5822f30580eb0; \>= aef6987d89544d63a47753cf3741cabff0b5574c, \< bbce3de72be56e4b5f68924b7da9630cc89aa1a8
- Anyone running Linux 6.12

## Description

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

sched/eevdf: Fix se-\>slice being set to U64\_MAX and resulting crash

There is a code path in dequeue\_entities() that can set the slice of a
sched\_entity to U64\_MAX, which sometimes results in a crash.

The offending case is when dequeue\_entities() is called to dequeue a
delayed group entity, and then the entity's parent's dequeue is delayed.
In that case:

1. In the if (entity\_is\_task(se)) else block at the beginning of
   dequeue\_entities(), slice is set to
   cfs\_rq\_min\_slice(group\_cfs\_rq(se)). If the entity was delayed, then
   it has no queued tasks, so cfs\_rq\_min\_slice() returns U64\_MAX.
2. The first for\_each\_sched\_entity() loop dequeues the entity.
3. If the entity was its parent's only child, then the next iteration
   tries to dequeue the parent.
4. If the parent's dequeue needs to be delayed, then it breaks from the
   first for\_each\_sched\_entity() loop \_without updating slice\_.
5. The second for\_each\_sched\_entity() loop sets the parent's -\>slice to
   the saved slice, which is still U64\_MAX.

This throws off subsequent calculations with potentially catastrophic
results. A manifestation we saw in production was:

6. In update\_entity\_lag(), se-\>slice is used to calculate limit, which
   ends up as a huge negative number.
7. limit is used in se-\>vlag = clamp(vlag, -limit, limit). Because limit
   is negative, vlag \> limit, so se-\>vlag is set to the same huge
   negative number.
8. In place\_entity(), se-\>vlag is scaled, which overflows and results in
   another huge (positive or negative) number.
9. The adjusted lag is subtracted from se-\>vruntime, which increases or
   decreases se-\>vruntime by a huge number.
10. pick\_eevdf() calls entity\_eligible()/vruntime\_eligible(), which
    incorrectly returns false because the vruntime is so far from the
    other vruntimes on the queue, causing the
    (vruntime - cfs\_rq-\>min\_vruntime) \* load calulation to overflow.
11. Nothing appears to be eligible, so pick\_eevdf() returns NULL.
12. pick\_next\_entity() tries to dereference the return value of
    pick\_eevdf() and crashes.

Dumping the cfs\_rq states from the core dumps with drgn showed tell-tale
huge vruntime ranges and bogus vlag values, and I also traced se-\>slice
being set to U64\_MAX on live systems (which was usually "benign" since
the rest of the runqueue needed to be in a particular state to crash).

Fix it in dequeue\_entities() by always setting slice from the first
non-empty cfs\_rq.

## Affected and fixed versions

- Linux: \>= aef6987d89544d63a47753cf3741cabff0b5574c, \< 86b37810fa1e40b93171da023070b99ccbb4ea04; \>= aef6987d89544d63a47753cf3741cabff0b5574c, \< 50a665496881262519f115f1bfe5822f30580eb0; \>= aef6987d89544d63a47753cf3741cabff0b5574c, \< bbce3de72be56e4b5f68924b7da9630cc89aa1a8 (cvelist)
- Linux: 6.12 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-37821. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-37821.md
Affected: Linux >= aef6987d89544d63a47753cf3741cabff0b5574c, < 86b37810fa1e40b93171da023070b99ccbb4ea04; >= aef6987d89544d63a47753cf3741cabff0b5574c, < 50a665496881262519f115f1bfe5822f30580eb0; >= aef6987d89544d63a47753cf3741cabff0b5574c, < bbce3de72be56e4b5f68924b7da9630cc89aa1a8; Linux 6.12
Fixed in: Linux 86b37810fa1e40b93171da023070b99ccbb4ea04, Linux 50a665496881262519f115f1bfe5822f30580eb0

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-37821 being exploited?

There is no confirmed exploitation: CVE-2025-37821 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2025-37821?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-37821?

Linux \>= aef6987d89544d63a47753cf3741cabff0b5574c, \< 86b37810fa1e40b93171da023070b99ccbb4ea04; \>= aef6987d89544d63a47753cf3741cabff0b5574c, \< 50a665496881262519f115f1bfe5822f30580eb0; \>= aef6987d89544d63a47753cf3741cabff0b5574c, \< bbce3de72be56e4b5f68924b7da9630cc89aa1a8; Linux 6.12.

### Is there a fix for CVE-2025-37821?

Yes. Fixed in Linux 86b37810fa1e40b93171da023070b99ccbb4ea04, Linux 50a665496881262519f115f1bfe5822f30580eb0. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-37821?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/86b37810fa1e40b93171da023070b99ccbb4ea04>
- patch: <https://git.kernel.org/stable/c/50a665496881262519f115f1bfe5822f30580eb0>
- patch: <https://git.kernel.org/stable/c/bbce3de72be56e4b5f68924b7da9630cc89aa1a8>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-37821>

HTML: <https://flawdb.com/CVE-2025-37821> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-37821>
