Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-37821— sched/eevdf: Fix se->slice being set to U64_MAX and resulting crash

EPSS 0.07% · P22
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2025-37821

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
sched/eevdf: Fix se->slice being set to U64_MAX and resulting crash
Source: NVD (National Vulnerability Database)
Vulnerability 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.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于调度器切片设置不当,可能导致内核崩溃。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux aef6987d89544d63a47753cf3741cabff0b5574c ~ 86b37810fa1e40b93171da023070b99ccbb4ea04 -
LinuxLinux 6.12 -

II. Public POCs for CVE-2025-37821

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-37821

登录查看更多情报信息。

Same Patch Batch · Linux · 2025-05-08 · 33 CVEs total

CVE-2025-37818LoongArch: Return NULL from huge_pte_offset() for invalid PMD
CVE-2025-37833net/niu: Niu requires MSIX ENTRY_DATA fields touch before entry reads
CVE-2025-37834mm/vmscan: don't try to reclaim hwpoison folio
CVE-2025-37831cpufreq: apple-soc: Fix null-ptr-deref in apple_soc_cpufreq_get_rate()
CVE-2025-37830cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
CVE-2025-37829cpufreq: scpi: Fix null-ptr-deref in scpi_cpufreq_get_rate()
CVE-2025-37828scsi: ufs: mcq: Add NULL check in ufshcd_mcq_abort()
CVE-2025-37826scsi: ufs: core: Add NULL check in ufshcd_mcq_compl_pending_transfer()
CVE-2025-37827btrfs: zoned: return EIO on RAID1 block group write pointer mismatch
CVE-2025-37825nvmet: fix out-of-bounds access in nvmet_enable_port
CVE-2025-37823net_sched: hfsc: Fix a potential UAF in hfsc_dequeue() too
CVE-2025-37824tipc: fix NULL pointer dereference in tipc_mon_reinit_self()
CVE-2025-37822riscv: uprobes: Add missing fence.i after building the XOL buffer
CVE-2025-37820xen-netfront: handle NULL returned by xdp_convert_buff_to_frame()
CVE-2025-37819irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode()
CVE-2025-37817mcb: fix a double free bug in chameleon_parse_gdd()
CVE-2025-37800driver core: fix potential NULL pointer dereference in dev_uevent()
CVE-2025-37816mei: vsc: Fix fortify-panic caused by invalid counted_by() use
CVE-2025-37815misc: microchip: pci1xxxx: Fix Kernel panic during IRQ handler registration
CVE-2025-37814tty: Require CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT

Showing top 20 of 33 CVEs. View all on vendor page → →

IV. Related Vulnerabilities

V. Comments for CVE-2025-37821

No comments yet


Leave a comment