CVE-2025-37999
Linux Kernel vulnerability analysis and mitigation

Overview

A vulnerability in the Linux kernel's EROFS (Enhanced Read-Only File System) component was discovered and assigned CVE-2025-37999. The issue was disclosed on May 29, 2025, affecting the fs/erofs/fileio subsystem. The vulnerability was introduced by commit ce63cb62d794 ("erofs: support unencoded inodes for fileio") and became more easily exploitable after commit 9f74ae8c9ac9 reduced the bio array capacity from 256 to 16 folios (NVD, Debian Tracker).

Technical details

The vulnerability occurs in the erofsfileioscanfolio() function when bioaddfolio() fails due to a full buffer. When this happens, the function needs to submit the I/O request via erofsfileiorqsubmit() and allocate a new I/O request with an empty struct bio. The issue stems from incorrect ordering of erofsonlinefoliosplit() calls relative to bioaddfolio(), which results in folio->private being incremented without a matching erofsonlinefolioend() call (NVD).

Impact

When exploited, this vulnerability results in folios becoming permanently locked, causing all waiters to become stuck in foliowaitbit_common(). This condition can lead to system resource exhaustion and potential denial of service conditions (Wiz).

Mitigation and workarounds

The vulnerability has been fixed by modifying the code to invoke erofsonlinefoliosplit() only after bioaddfolio() has succeeded. This fix ensures proper synchronization between folio operations. The fix has been implemented in various Linux distributions, with Debian marking it as fixed in versions 6.12.29-1 and later (Debian Tracker).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40344N/AN/A
  • Linux KernelLinux Kernel
  • kernel-debug-modules-internal
NoYesDec 09, 2025
CVE-2025-40343N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel
NoYesDec 09, 2025
CVE-2025-40342N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel-matched
NoYesDec 09, 2025
CVE-2025-40341N/AN/A
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-modules-extra
NoYesDec 09, 2025
CVE-2025-40340N/AN/A
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-kvm
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management