linux-stable/fs/fat
Jan Kara 74f852654b 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:11:11 +02:00
..
.kunitconfig
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile
cache.c
dir.c Change calling conventions for filldir_t 2022-08-17 17:25:04 -04:00
fat.h fs: drop the timespec64 argument from update_time 2023-08-11 09:04:57 +02:00
fat_test.c
fatent.c fat: add ratelimit to fat*_ent_bread() 2022-04-29 14:38:02 -07:00
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
misc.c fat: convert to new timestamp accessors 2023-10-18 14:08:03 +02:00
namei_msdos.c fs: port ->rename() to pass mnt_idmap 2023-01-19 09:24:26 +01:00
namei_vfat.c There is no particular theme here - mainly quick hits all over the tree. 2023-02-23 17:55:40 -08:00
nfs.c fat: fix uninitialized field in nostale filehandles 2024-04-03 15:11:11 +02:00