Subject: CVE-2024-26772: ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()

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

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

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

ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()

Places the logic for checking if the group's block bitmap is corrupt under
the protection of the group lock to avoid allocating blocks from the group
with a corrupted block bitmap.

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

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

	Fixed in 4.19.308 with commit 5a6dcc4ad0f7
	Fixed in 5.4.270 with commit 6b92b1bc16d6
	Fixed in 5.10.211 with commit ffeb72a80a82
	Fixed in 5.15.150 with commit 8de8305a25bf
	Fixed in 6.1.80 with commit d639102f4cbd
	Fixed in 6.6.19 with commit d3bbe77a76bc
	Fixed in 6.7.7 with commit 21dbe20589c7
	Fixed in 6.8 with commit 832698373a25

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-26772
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/mballoc.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/5a6dcc4ad0f7f7fa8e8d127b5526e7c5f2d38a43
	https://git.kernel.org/stable/c/6b92b1bc16d691c95b152c6dbf027ad64315668d
	https://git.kernel.org/stable/c/ffeb72a80a82aba59a6774b0611f792e0ed3b0b7
	https://git.kernel.org/stable/c/8de8305a25bfda607fc13475ebe84b978c96d7ff
	https://git.kernel.org/stable/c/d639102f4cbd4cb65d1225dba3b9265596aab586
	https://git.kernel.org/stable/c/d3bbe77a76bc52e9d4d0a120f1509be36e25c916
	https://git.kernel.org/stable/c/21dbe20589c7f48e9c5d336ce6402bcebfa6d76a
	https://git.kernel.org/stable/c/832698373a25950942c04a512daa652c18a9b513