Skip to contentSkip to conversation

CVE-2026-53272: erofs: fix use-after-free on sbi->sync_decompress

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jun 25

lore
Share & tools
lore
#0 lore raw

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

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

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

erofs: fix use-after-free on sbi->sync_decompress

z_erofs_decompress_kickoff() can race with filesystem unmount, causing a use-after-free on sbi->sync_decompress.

When I/O completes, z_erofs_endio() calls z_erofs_decompress_kickoff() to queue z_erofs_decompressqueue_work() asynchronously. Then, after all folios are unlocked, unmount workflow can proceed and sbi will be freed before accessing to sbi->sync_decompress.

Thread (unmount) I/O completion kworker
queue_work
z_erofs_decompressqueue_work
(all folios are unlocked)
cleanup_mnt
..
erofs_kill_sb
erofs_sb_free
kfree(sbi)

                        access sbi->sync_decompress  // UAF!!

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

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

	Issue introduced in 5.17 with commit 40452ffca3c1a0f2994e826f9fa213b107f1a2d4 and fixed in 6.12.94 with commit 86ab00cf81d44b675bb23db62b88fd76c8ac8cea
	Issue introduced in 5.17 with commit 40452ffca3c1a0f2994e826f9fa213b107f1a2d4 and fixed in 6.18.36 with commit 00bf6868df65fa95b3854996246d15759fdc7070
	Issue introduced in 5.17 with commit 40452ffca3c1a0f2994e826f9fa213b107f1a2d4 and fixed in 7.0.13 with commit 95caf60da33d87ed26c28993620f0d92487b0296
	Issue introduced in 5.17 with commit 40452ffca3c1a0f2994e826f9fa213b107f1a2d4 and fixed in 7.1 with commit 1aee05e814d292064bf5fa15733741040cdc48ba

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

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/erofs/zdata.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/86ab00cf81d44b675bb23db62b88fd76c8ac8cea
	https://git.kernel.org/stable/c/00bf6868df65fa95b3854996246d15759fdc7070
	https://git.kernel.org/stable/c/95caf60da33d87ed26c28993620f0d92487b0296
	https://git.kernel.org/stable/c/1aee05e814d292064bf5fa15733741040cdc48ba