linux-stable/fs/fat
Jan Kara cdd33d54e7 fat: fix uninitialized field in nostale filehandles
[ Upstream commit fde2497d2b ]

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.

Link: https://lkml.kernel.org/r/20240205122626.13701-1-jack@suse.cz
Reported-by: syzbot+3ce5dea5b1539ff36769@syzkaller.appspotmail.com
Fixes: ea3983ace6 ("fat: restructure export_operations")
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-03 15:32:06 +02:00
..
.kunitconfig
cache.c
dir.c
fat.h fs: drop the timespec64 argument from update_time 2023-08-11 09:04:57 +02:00
fat_test.c
fatent.c
file.c fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
inode.c fat: convert to new timestamp accessors 2023-10-18 14:08:03 +02:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile
misc.c fat: convert to new timestamp accessors 2023-10-18 14:08:03 +02:00
namei_msdos.c
namei_vfat.c
nfs.c fat: fix uninitialized field in nostale filehandles 2024-04-03 15:32:06 +02:00