CVE-2026-100093: f2fs: disallow mmap write and data-modifying fallocate on atomic files
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 FALLOCFLPUNCHHOLE, FALLOCFLZERORANGE, FALLOCFLCOLLAPSERANGE or FALLOCFLINSERTRANGE do not go through ->writebegin, 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.
f2fsvmpagemkwrite() cannot take inodelock, so check the flag under invalidatelock, and hold invalidatelock in f2fsiocstartatomicwrite() from the flush until the flag is set. Otherwise a fault could check the flag, then startatomicwrite could flush and set the flag, and the fault would dirty the folio afterwards.