CVE-2026-31465: writeback: don't block sync for filesystems with no data integrity guarantees
In the Linux kernel, the following vulnerability has been resolved:
writeback: don't block sync for filesystems with no data integrity guarantees
Add a SBINODATAINTEGRITY superblock flag for filesystems that cannot guarantee data persistence on sync (eg fuse). For superblocks with this flag set, sync kicks off writeback of dirty inodes but does not wait for the flusher threads to complete the writeback.
This replaces the per-inode ASNODATAINTEGRITY mapping flag added in commit f9a49aa302a0 ("fs/writeback: skip ASNODATAINTEGRITY mappings in waitsbinodes()"). The flag belongs at the superblock level because data integrity is a filesystem-wide property, not a per-inode one. Having this flag at the superblock level also allows us to skip having to iterate every dirty inode in waitsbinodes() only to skip each inode individually.
Prior to this commit, mappings with no data integrity guarantees skipped waiting on writeback completion but still waited on the flusher threads to finish initiating the writeback. Waiting on the flusher threads is unnecessary. This commit kicks off writeback but does not wait on the flusher threads. This change properly addresses a recent report [1] for a suspend-to-RAM hang seen on fuse-overlayfs that was caused by waiting on the flusher threads to finish:
Workqueue: pmfssync pmfssyncworkfn Call Trace: <TASK> schedule+0x457/0x1720 schedule+0x27/0xd0 wbwaitforcompletion+0x97/0xe0 syncinodessb+0xf8/0x2e0 iteratesupers+0xdc/0x160 ksyssync+0x43/0xb0 pmfssyncworkfn+0x17/0xa0 processonework+0x193/0x350 workerthread+0x1a1/0x310 kthread+0xfc/0x240 retfromfork+0x243/0x280 retfromforkasm+0x1a/0x30 </TASK>
On fuse this is problematic because there are paths that may cause the flusher thread to block (eg if systemd freezes the user session cgroups first, which freezes the fuse daemon, before invoking the kernel suspend. The kernel suspend triggers ->writenode() which on fuse issues a synchronous setattr request, which cannot be processed since the daemon is frozen. Or if the daemon is buggy and cannot properly complete writeback, initiating writeback on a dirty folio already under writeback leads to writebackgetfolio() -> foliopreparewriteback() -> unconditional wait on writeback to finish, which will cause a hang). This commit restores fuse to its prior behavior before tmp folios were removed, where sync was essentially a no-op.
[1] https://lore.kernel.org/linux-fsdevel/CAJnrk1a-asuvfrbKXbEwwDSctvemF+6zfhdnuzO65Pt8HsFSRw@mail.gmail.com/T/#m632c4648e9cafc4239299887109ebd880ac6c5c1
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.19.11-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.116-1Fixed in 7.2.15-1Fixed in 7.3.4-1 - Configuration
Set the SB_I_NO_DATA_INTEGRITY superblock flag for filesystems that cannot guarantee data persistence on sync, such as FUSE.
FUSE filesystem superblocks SB_I_NO_DATA_INTEGRITY = set
Event History
Frequently Asked Questions
Who is exposed to this issue?
The issue affects Linux kernel systems using filesystems that cannot guarantee data persistence on sync, such as FUSE filesystems. The affected behavior is filesystem-wide rather than limited to individual inodes.
What access would an attacker need?
The supplied vector indicates local access and low privileges are required. No user interaction is required.
What is the relevant sync behavior after the fix?
For filesystems marked as lacking data-integrity guarantees, sync initiates writeback of dirty inodes but does not wait for flusher threads to finish. This avoids blocking sync on writeback completion where persistence cannot be guaranteed.