Skip to contentSkip to conversation

CVE-2026-89833: f2fs: fix to avoid potential deadloop in f2fs_fsync_node_pages()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

f2fs: fix to avoid potential deadloop in f2fs_fsync_node_pages()

There is potential deadloop in race condition:

Thread A Thread B
- fsync
- f2fs_do_sync_file
- f2fs_fsync_node_pages
- last_fsync_dnode
- folio_get(last_folio)
- f2fs_setattr
- f2fs_truncate
- f2fs_truncate_blocks
- f2fs_do_truncate_blocks
- f2fs_truncate_inode_blocks
- truncate_dnode
- truncate_node
- invalidate_mapping_pages
- folio->mapping = NULL
- is_node_folio alwasy return false
- atomic && !marked is always true,
then goto retry

The Linux kernel CVE team has assigned CVE-2026-89833 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.7 with commit 608514deba38c8611ad330d6a3c8e2b9a1f68e4b and fixed in 6.18.51 with commit 161513f53e4ac90fd356433bdf8e31e6adeb92af
	Issue introduced in 4.7 with commit 608514deba38c8611ad330d6a3c8e2b9a1f68e4b and fixed in 7.2.5 with commit 905411f6504876d268ba8dafc8e75367782da4b7
	Issue introduced in 4.7 with commit 608514deba38c8611ad330d6a3c8e2b9a1f68e4b and fixed in 7.3-rc1 with commit ce366bfa821ec81dd45bde547ee31e659306cc61

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-89833

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	fs/f2fs/node.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/161513f53e4ac90fd356433bdf8e31e6adeb92af
	https://git.kernel.org/stable/c/905411f6504876d268ba8dafc8e75367782da4b7
	https://git.kernel.org/stable/c/ce366bfa821ec81dd45bde547ee31e659306cc61