Subject: CVE-2024-27035: f2fs: compress: fix to guarantee persisting compressed blocks by CP

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

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

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

f2fs: compress: fix to guarantee persisting compressed blocks by CP

If data block in compressed cluster is not persisted with metadata
during checkpoint, after SPOR, the data may be corrupted, let's
guarantee to write compressed page by checkpoint.

The Linux kernel CVE team has assigned CVE-2024-27035 to this issue.

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

	Issue introduced in 5.6 with commit 4c8ff7095bef and fixed in 6.1.83 with commit e54cce813725
	Issue introduced in 5.6 with commit 4c8ff7095bef and fixed in 6.6.23 with commit 82704e598d7b
	Issue introduced in 5.6 with commit 4c8ff7095bef and fixed in 6.7.11 with commit c3311694b9bc
	Issue introduced in 5.6 with commit 4c8ff7095bef and fixed in 6.8.2 with commit 57e8b17d0522
	Issue introduced in 5.6 with commit 4c8ff7095bef and fixed in 6.9 with commit 8a430dd49e9c

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-2024-27035
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/compress.c
	fs/f2fs/data.c
	fs/f2fs/f2fs.h

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/e54cce8137258a550b49cae45d09e024821fb28d
	https://git.kernel.org/stable/c/82704e598d7b33c7e45526e34d3c585426319bed
	https://git.kernel.org/stable/c/c3311694b9bcced233548574d414c91d39214684
	https://git.kernel.org/stable/c/57e8b17d0522c8f4daf0c4d9969b4d7358033532
	https://git.kernel.org/stable/c/8a430dd49e9cb021372b0ad91e60aeef9c6ced00