All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-cve-announce@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@kernel.org>
Subject: CVE-2026-68459: f2fs: fix potential deadlock in gc_merge path of f2fs_balance_fs()
Date: Sat, 15 Aug 2026 15:01:01 +0900	[thread overview]
Message-ID: <2026081502-CVE-2026-68459-5502@gregkh> (raw)

From: Greg Kroah-Hartman <gregkh@kernel.org>

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

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

f2fs: fix potential deadlock in gc_merge path of f2fs_balance_fs()

When we mount device w/ gc_merge mount option, we may suffer below
potential deadlock:

Kworker					GC trehad			Truncator
- f2fs_write_cache_pages
 - f2fs_write_single_data_page
  - f2fs_do_write_data_page
   - folio_start_writeback  --- set writeback flag on folio
   - f2fs_outplace_write_data
   : cached folio in internal bio cache
  - f2fs_balance_fs
   - wake_up(gc_thread)
   : wake up gc thread to run foreground GC
   - finish_wait(fggc_wq)
   : wait on the waitqueue --- wait on GC thread to finish the work
									- truncate_inode_pages_range
									 - __filemap_get_folio(, FGP_LOCK)  --- lock folio
									 - truncate_inode_partial_folio
									  - folio_wait_writeback            --- wait on writeback being cleared
					- do_garbage_collect
					 - move_data_page
					  - f2fs_get_lock_data_folio
					   - lock on folio  --- blocked on folio's lock

In order to avoid such deadlock, let's call below functions to commit
cached bios in GC_MERGE path of f2fs_balance_fs() as the same as we did
in NOGC_MERGE path.
- f2fs_submit_merged_write(sbi, DATA);
- f2fs_submit_all_merged_ipu_writes(sbi);

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


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

	Issue introduced in 3.8 with commit 351df4b201157351c7d26bf12c3eeb9dbce98854 and fixed in 5.15.212 with commit 8071500a8124e5a6d47d901a8d5ffd91743107a1
	Issue introduced in 3.8 with commit 351df4b201157351c7d26bf12c3eeb9dbce98854 and fixed in 6.1.178 with commit eb02f218aacb36365e0ca2339cbae81fb05d31a5
	Issue introduced in 3.8 with commit 351df4b201157351c7d26bf12c3eeb9dbce98854 and fixed in 6.6.145 with commit 1436031b33fa23ab1ce7df5bc5500093413e8acf
	Issue introduced in 3.8 with commit 351df4b201157351c7d26bf12c3eeb9dbce98854 and fixed in 6.12.96 with commit b885c7783c19c36c7bf899492a0bffcd68afa8c7
	Issue introduced in 3.8 with commit 351df4b201157351c7d26bf12c3eeb9dbce98854 and fixed in 6.18.39 with commit 89479a27fa4e1e11f378b3724944eabceb84f114
	Issue introduced in 3.8 with commit 351df4b201157351c7d26bf12c3eeb9dbce98854 and fixed in 7.1.5 with commit aa807064473abd6f2cafe419fb77ea402d3e3104
	Issue introduced in 3.8 with commit 351df4b201157351c7d26bf12c3eeb9dbce98854 and fixed in 7.2-rc1 with commit 8b4468ec023d0d1b4669dfb867588997cc03a06b

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-68459
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/segment.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/8071500a8124e5a6d47d901a8d5ffd91743107a1
	https://git.kernel.org/stable/c/eb02f218aacb36365e0ca2339cbae81fb05d31a5
	https://git.kernel.org/stable/c/1436031b33fa23ab1ce7df5bc5500093413e8acf
	https://git.kernel.org/stable/c/b885c7783c19c36c7bf899492a0bffcd68afa8c7
	https://git.kernel.org/stable/c/89479a27fa4e1e11f378b3724944eabceb84f114
	https://git.kernel.org/stable/c/aa807064473abd6f2cafe419fb77ea402d3e3104
	https://git.kernel.org/stable/c/8b4468ec023d0d1b4669dfb867588997cc03a06b

                 reply	other threads:[~2026-08-15  6:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026081502-CVE-2026-68459-5502@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=cve@kernel.org \
    --cc=gregkh@kernel.org \
    --cc=linux-cve-announce@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.