Subject: CVE-2024-42078: nfsd: initialise nfsd_info.mutex early.

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

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

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

nfsd: initialise nfsd_info.mutex early.

nfsd_info.mutex can be dereferenced by svc_pool_stats_start()
immediately after the new netns is created.  Currently this can
trigger an oops.

Move the initialisation earlier before it can possibly be dereferenced.

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

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

	Issue introduced in 6.8 with commit 7b207ccd9833 and fixed in 6.9.8 with commit 7e8b94045bc7
	Issue introduced in 6.8 with commit 7b207ccd9833 and fixed in 6.10 with commit e0011bca603c

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-42078
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/nfsd/nfsctl.c
	fs/nfsd/nfssvc.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/7e8b94045bc77ce4f085ddfb9eb04e5760e66169
	https://git.kernel.org/stable/c/e0011bca603c101f2a3c007bdb77f7006fa78fb1