Subject: CVE-2024-42143: orangefs: fix out-of-bounds fsid access

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

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

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

orangefs: fix out-of-bounds fsid access

Arnd Bergmann sent a patch to fsdevel, he says:

"orangefs_statfs() copies two consecutive fields of the superblock into
the statfs structure, which triggers a warning from the string fortification
helpers"

Jan Kara suggested an alternate way to do the patch to make it more readable.

I ran both ideas through xfstests and both seem fine. This patch
is based on Jan Kara's suggestion.

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

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

	Fixed in 4.19.318 with commit b90176a95537
	Fixed in 5.4.280 with commit 556edaa27c27
	Fixed in 5.10.222 with commit 1617249e24bd
	Fixed in 5.15.163 with commit 137a06dc0ff8
	Fixed in 6.1.98 with commit 74159d409da8
	Fixed in 6.6.39 with commit 6a3cacf6d3cf
	Fixed in 6.9.9 with commit de8a5f7b7180
	Fixed in 6.10 with commit 53e4efa470d5

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-42143
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/orangefs/super.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/b90176a9553775e23966650e445b1866e62e4924
	https://git.kernel.org/stable/c/556edaa27c27db24a0f34c78cebef90e5bb6e167
	https://git.kernel.org/stable/c/1617249e24bd04c8047956afb43feec4876d1715
	https://git.kernel.org/stable/c/137a06dc0ff8b2d2069c2345d015ef0fa71df1ed
	https://git.kernel.org/stable/c/74159d409da82269311a60256aad8ae8753da450
	https://git.kernel.org/stable/c/6a3cacf6d3cf0278aa90392aef2fc3fe2717a047
	https://git.kernel.org/stable/c/de8a5f7b71800a11fbaffc8ddacf08ead78afcc5
	https://git.kernel.org/stable/c/53e4efa470d5fc6a96662d2d3322cfc925818517