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

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

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.

ProductVersions
Linux Linux3db1de0e582c358dd013f3703cd55b5fe4076436 to before e40ae42d992ebec22e073a19d62555635b96aa1e Affected3db1de0e582c358dd013f3703cd55b5fe4076436 to before 3c818534db37f5cfe72c19a78a436bddcb13a177 Affected3db1de0e582c358dd013f3703cd55b5fe4076436 to before 8dca8bd7f58137b11d7b6b64b44f7c1cd5ed8817 Affected3db1de0e582c358dd013f3703cd55b5fe4076436 to before 5e93214d8ccbf8fd0e955faf4f4070df1f4175e8 Affected3db1de0e582c358dd013f3703cd55b5fe4076436 to before 41f17fbbd2199e6cfc6edcbce6f7e33885c1aea8 Affected3db1de0e582c358dd013f3703cd55b5fe4076436 to before 06dfe4a7eb696d868b196c2a49873142f19bd862 Affected6db52f1944417c2601182a591a704e2f119c5215 Affected5.18.18 to before 5.19 Affected
Linux Linux5.19 Affectedbefore 5.19 Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.117 through 6.12.* Not Affected6.18.63 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.