CVE-2025-37858
MediumIn the Linux kernel, the following vulnerability has been resolved: fs/jfs: Prevent integer overflow in AG size calculation The JFS filesystem calculates allocation group (AG) size using 1 << l2agsize in dbExtendFS(). When l2agsize exceeds 31 (possible with >2TB aggregates on 32-bit systems), this 32-bit shift operation causes undefined behavior and improper AG sizing. On 32-bit architectures: - Left-shifting 1 by 32+ bits results in 0 due to integer overflow - This creates invalid AG sizes (0 or garbage values) in sbi->bmap->db_agsize - Subsequent block allocations would reference invalid AG structures - Could lead to: - Filesystem corruption during extend operations - Kernel crashes due to invalid memory accesses - Security vulnerabilities via malformed on-disk structures Fix by casting to s64 before shifting: bmp->db_agsize = (s64)1 << l2agsize; This ensures 64-bit arithmetic even on 32-bit architectures. The cast matches the data type of db_agsize (s64) and follows similar patterns in JFS block calculation code. Found by Linux Verification Center (linuxtesting.org) with SVACE.
CVSS 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-190CVE-2025-37858 is a Integer Overflow vulnerability
What is Integer Overflow?
The product performs a calculation that can produce an integer overflow, leading to unexpected values. Learn more on MITRE CWE
Affected versions
Linux kernel versions
2.6.12
and later are affected. Fixed in
5.4.293,
5.10.237,
5.15.181,
6.1.135,
6.6.88,
6.12.24,
6.13.12,
6.14.3,
6.15
and their respective stable series.
References
The following references provide additional information about CVE-2025-37858 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
Mailing List Third Party Advisory
-
Mailing List Third Party Advisory
-
PatchKernel patch commithttps://git.kernel.org/stable/c/211ed8f5e39e61f9e4d18edd64ce8005a67a1b2a
-
PatchKernel patch commithttps://git.kernel.org/stable/c/3d8a45f87010a802aa214bf39702ca9d99cbf3ba
-
PatchKernel patch commithttps://git.kernel.org/stable/c/55edbf5dbf60a8195c21e92124c4028939ae16b2
Frequently asked questions
-
What is CVE-2025-37858?
CVE-2025-37858 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as an Integer Overflow flaw (CWE-190) . It affects Linux kernel versions from 2.6.12 onward and has been patched in 5.4.293, 5.10.237, 5.15.181 and others. CVE-2025-37858 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2025-37858?
CVE-2025-37858 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2025-37858?
Yes — CVE-2025-37858 has been patched. Fixed versions include 5.4.293, 5.10.237, 5.15.181 and others. If you are running Linux kernel 2.6.12 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2025-37858 actively exploited?
No — CVE-2025-37858 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Integer Overflow (CWE-190)?
The product performs a calculation that can produce an integer overflow, leading to unexpected values. View CWE-190 on MITRE CWE →