Skip to contentSkip to conversation

CVE-2026-93269: ext4: fix circular lock dependency in ext4_ext_migrate

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 24

lore
Share & tools
lore
#0 lore raw

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

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

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

ext4: fix circular lock dependency in ext4_ext_migrate

Move iput(tmp_inode) after ext4_writepages_up_write() to avoid a circular lock dependency between s_writepages_rwsem and sb_internal (freeze protection).

The deadlock scenario:

CPU0 (EXT4_IOC_MIGRATE) CPU1 (orphan cleanup during mount)
---- ----
ext4_ext_migrate()

    ext4_writepages_down_write()
      s_writepages_rwsem (write)
                                 ext4_evict_inode()
                                   sb_start_intwrite()   [sb_internal]
                                   ...
                                     ext4_writepages()
                                       s_writepages_rwsem (read) [BLOCKED]
    iput(tmp_inode)
      ext4_evict_inode()
        sb_start_intwrite()         [BLOCKED]

The tmp_inode is a temporary inode with nlink=0 created solely for building the extent tree. Its eviction does not require s_writepages_rwsem protection, so deferring iput() until after releasing the rwsem is safe.

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

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

	Issue introduced in 5.6 with commit cb85f4d23f794e24127f3e562cb3b54b0803f456 and fixed in 6.6.157 with commit 452950461241dfed8b1d32e94b227db38c99c5af
	Issue introduced in 5.6 with commit cb85f4d23f794e24127f3e562cb3b54b0803f456 and fixed in 6.12.110 with commit ada23457d4748d6e9c36c6f871fc29a6f558c48c
	Issue introduced in 5.6 with commit cb85f4d23f794e24127f3e562cb3b54b0803f456 and fixed in 6.18.52 with commit e4223231b6860141813637a6413c2371ae4d6fa8
	Issue introduced in 5.6 with commit cb85f4d23f794e24127f3e562cb3b54b0803f456 and fixed in 7.2.6 with commit 32f7ab52875ec7f800ca67e7176e5743a84baddf
	Issue introduced in 5.6 with commit cb85f4d23f794e24127f3e562cb3b54b0803f456 and fixed in 7.3-rc1 with commit a897682793eba5de51ee6f3152760374afa629cf
	Issue introduced in 4.9.215 with commit eb799e163dc2bc1ea0a4820b66f79d32a5e907df
	Issue introduced in 4.14.172 with commit bcc1eab71a67c46b9e24544ac7923f44444174ce
	Issue introduced in 4.19.107 with commit 8cf20fb73e73a4c4df0328b5297842c5ef34fdd9
	Issue introduced in 5.4.23 with commit e5d25003d059649e18a249635ed5ca7a7b1de5ad
	Issue introduced in 5.5.7 with commit 69f8a7991fd93c49096ddd11574db3e7df238b7b

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-93269

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/ext4/migrate.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/452950461241dfed8b1d32e94b227db38c99c5af
	https://git.kernel.org/stable/c/ada23457d4748d6e9c36c6f871fc29a6f558c48c
	https://git.kernel.org/stable/c/e4223231b6860141813637a6413c2371ae4d6fa8
	https://git.kernel.org/stable/c/32f7ab52875ec7f800ca67e7176e5743a84baddf
	https://git.kernel.org/stable/c/a897682793eba5de51ee6f3152760374afa629cf