Subject: CVE-2024-26973: fat: fix uninitialized field in nostale filehandles

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

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

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

fat: fix uninitialized field in nostale filehandles

When fat_encode_fh_nostale() encodes file handle without a parent it
stores only first 10 bytes of the file handle. However the length of the
file handle must be a multiple of 4 so the file handle is actually 12
bytes long and the last two bytes remain uninitialized. This is not
great at we potentially leak uninitialized information with the handle
to userspace. Properly initialize the full handle length.

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

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

	Issue introduced in 3.10 with commit ea3983ace6b7 and fixed in 4.19.312 with commit 9840d1897e28
	Issue introduced in 3.10 with commit ea3983ace6b7 and fixed in 5.4.274 with commit f52d7663a10a
	Issue introduced in 3.10 with commit ea3983ace6b7 and fixed in 5.10.215 with commit a276c595c3a6
	Issue introduced in 3.10 with commit ea3983ace6b7 and fixed in 5.15.154 with commit b7fb63e807c6
	Issue introduced in 3.10 with commit ea3983ace6b7 and fixed in 6.1.84 with commit c8cc05de8e6b
	Issue introduced in 3.10 with commit ea3983ace6b7 and fixed in 6.6.24 with commit 03a7e3f2ba3c
	Issue introduced in 3.10 with commit ea3983ace6b7 and fixed in 6.7.12 with commit 74f852654b8b
	Issue introduced in 3.10 with commit ea3983ace6b7 and fixed in 6.8.3 with commit cdd33d54e789
	Issue introduced in 3.10 with commit ea3983ace6b7 and fixed in 6.9 with commit fde2497d2bc3

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-26973
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/fat/nfs.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/9840d1897e28f8733cc1e38f97e044f987dc0a63
	https://git.kernel.org/stable/c/f52d7663a10a1266a2d3871a6dd8fd111edc549f
	https://git.kernel.org/stable/c/a276c595c3a629170b0f052a3724f755d7c6adc6
	https://git.kernel.org/stable/c/b7fb63e807c6dadf7ecc1d43448c4f1711d7eeee
	https://git.kernel.org/stable/c/c8cc05de8e6b5612b6e9f92c385c1a064b0db375
	https://git.kernel.org/stable/c/03a7e3f2ba3ca25f1da1d3898709a08db14c1abb
	https://git.kernel.org/stable/c/74f852654b8b7866f15323685f1e178d3386c688
	https://git.kernel.org/stable/c/cdd33d54e789d229d6d5007cbf3f53965ca1a5c6
	https://git.kernel.org/stable/c/fde2497d2bc3a063d8af88b258dbadc86bd7b57c