VYPR
Unrated severityNVD Advisory· Published Oct 28, 2025· Updated Apr 15, 2026

CVE-2025-40077

CVE-2025-40077

Description

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

f2fs: fix to avoid overflow while left shift operation

Should cast type of folio->index from pgoff_t to loff_t to avoid overflow while left shift operation.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In the Linux kernel's f2fs filesystem, a missing cast from pgoff_t to loff_t before a left shift operation can cause an integer overflow, leading to potential data corruption or system instability.

Vulnerability

Overview

In the Linux kernel's f2fs (Flash-Friendly File System) implementation, a vulnerability exists in the handling of page indices during left shift operations. The issue arises because the folio->index field, which is of type pgoff_t, is shifted left without first being cast to loff_t. This can cause an integer overflow when the index value is large, leading to incorrect calculations of file offsets or block addresses [1].

Exploitation and

Attack Surface

An attacker with the ability to trigger file operations that manipulate large file offsets or page indices on an f2fs filesystem could exploit this overflow. The attack does not require special privileges beyond normal file access, but it does rely on the filesystem being under heavy usage or having very large files. The overflow occurs during internal kernel operations, so no direct network vector is involved; the attack surface is local, requiring either a local user or a malicious filesystem image [1].

Impact

If exploited, the integer overflow can lead to incorrect memory accesses or data corruption within the f2fs filesystem. This may result in system crashes (denial of service) or, in worst-case scenarios, potential privilege escalation if the corrupted data is used in security-critical contexts. The vulnerability primarily affects system stability and data integrity [1].

Mitigation

The fix involves casting folio->index to loff_t before performing the left shift, ensuring that the operation does not overflow. The patch has been applied to the stable kernel tree and is available in the referenced commit [1]. Users are advised to update their kernels to include this fix. No workarounds are known, and the vulnerability is not currently listed on CISA's Known Exploited Vulnerabilities (KEV) catalog.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

4

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.