CVE-2026-100093

f2fs: disallow mmap write and data-modifying fallocate on atomic files

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

f2fs: disallow mmap write and data-modifying fallocate on atomic files

Stores through a shared writable mapping and fallocate with
FALLOC_FL_PUNCH_HOLE, FALLOC_FL_ZERO_RANGE, FALLOC_FL_COLLAPSE_RANGE or
FALLOC_FL_INSERT_RANGE do not go through ->write_begin, so they bypass
the COW inode and modify the original inode directly. Reject them while
the file is in atomic write mode, as fallocate already does for pinned
and compressed files. A write fault gets SIGBUS and fallocate gets
-EOPNOTSUPP.

fallocate without these flags only preallocates blocks and stays
allowed.

f2fs_vm_page_mkwrite() cannot take inode_lock, so check the flag under
invalidate_lock, and hold invalidate_lock in
f2fs_ioc_start_atomic_write() from the flush until the flag is set.
Otherwise a fault could check the flag, then start_atomic_write could
flush and set the flag, and the fault would dirty the folio afterwards.

Analysis

AI-generated

Technical impact

The vulnerability resides in the Linux kernel’s f2fs file system. During an atomic write session the kernel incorrectly allows data‑modifying operations—such as mmap writes and fallocate with FALLOC_FL_PUNCH_HOLE, FALLOC_FL_ZERO_RANGE, FALLOC_FL_COLLAPSE_RANGE or FALLOC_FL_INSERT_RANGE—to modify the underlying inode directly, bypassing the copy‑on‑write mechanism. This can corrupt file contents and cause a fault that results in a SIGBUS error or an -EOPNOTSUPP return to the user. The impact is primarily a loss of data integrity and a potential denial of service if the fault propagates through the system.

Affected Systems

The flaw affects all Linux kernel builds that include the f2fs file system and support atomic write operations. Vendor information identifies the kernel as the affected component, but specific kernel version ranges that contain the issue are not provided in the supplied data. Users should consult the Linux kernel changelog for the f2fs patch to determine the exact kernel versions that are vulnerable.

Risk and Exploitability

The CVSS score is not available and the EPSS score is unknown; the vulnerability is not listed in CISA’s KEV catalog. Because the flaw requires the file to be in an atomic write mode—a state normally controlled by kernel‑initiated operations—the attack vector is most likely local and limited to processes that can trigger or exploit the atomic write workflow. In typical deployments the risk is moderate: while data corruption can occur, remote exploitation would require additional privileges or design flaws that are not indicated by the current information.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a release that includes the f2fs atomic‑write protection patch.
  • If an immediate kernel upgrade is not possible, configure the system to reject mmap write and the disallowed fallocate flags on f2fs files—for example, by auditing syscalls or adding kernel module parameters that return EOPNOTSUPP for these operations.
  • As a temporary workaround, avoid using atomic write mode on f2fs or remount the file system with options that disable inode locking mechanisms associated with atomic writes.

Generated by OpenCVE AI on November 30, 2026 at 16:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-362
CWE-665
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: f2fs: disallow mmap write and data-modifying fallocate on atomic files Stores through a shared writable mapping and fallocate with FALLOC_FL_PUNCH_HOLE, FALLOC_FL_ZERO_RANGE, FALLOC_FL_COLLAPSE_RANGE or FALLOC_FL_INSERT_RANGE do not go through ->write_begin, so they bypass the COW inode and modify the original inode directly. Reject them while the file is in atomic write mode, as fallocate already does for pinned and compressed files. A write fault gets SIGBUS and fallocate gets -EOPNOTSUPP. fallocate without these flags only preallocates blocks and stays allowed. f2fs_vm_page_mkwrite() cannot take inode_lock, so check the flag under invalidate_lock, and hold invalidate_lock in f2fs_ioc_start_atomic_write() from the flush until the flag is set. Otherwise a fault could check the flag, then start_atomic_write could flush and set the flag, and the fault would dirty the folio afterwards.
Title f2fs: disallow mmap write and data-modifying fallocate on atomic files
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-665

    Improper Initialization

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:23 PM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM