{"id":"DEBIAN-CVE-2025-37821","details":"In the Linux kernel, the following vulnerability has been resolved:  sched/eevdf: Fix se-\u003eslice 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 -\u003eslice 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-\u003eslice is used to calculate limit, which    ends up as a huge negative number. 7. limit is used in se-\u003evlag = clamp(vlag, -limit, limit). Because limit    is negative, vlag \u003e limit, so se-\u003evlag is set to the same huge    negative number. 8. In place_entity(), se-\u003evlag is scaled, which overflows and results in    another huge (positive or negative) number. 9. The adjusted lag is subtracted from se-\u003evruntime, which increases or    decreases se-\u003evruntime 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-\u003emin_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-\u003eslice 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.","modified":"2026-08-27T23:05:20.741261634Z","published":"2025-05-08T07:15:53.333Z","upstream":["CVE-2025-37821"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2025-37821"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.12.29-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2025-37821.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.12.29-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2025-37821.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}