linux/fs/notify/fanotify
Amir Goldstein 8631e01c2c fanotify: sanitize handle_type values when reporting fid
Unlike file_handle, type and len of struct fanotify_fh are u8.
Traditionally, filesystem return handle_type < 0xff, but there
is no enforecement for that in vfs.

Add a sanity check in fanotify to avoid truncating handle_type
if its value is > 0xff.

Fixes: 7cdafe6cc4 ("exportfs: check for error return value from exportfs_encode_*()")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250627104835.184495-1-amir73il@gmail.com
2025-06-27 19:17:26 +02:00
..
fanotify.c fanotify: sanitize handle_type values when reporting fid 2025-06-27 19:17:26 +02:00
fanotify.h fanotify: Drop use of flex array in fanotify_fh 2025-05-14 11:06:56 +02:00
fanotify_user.c \n 2025-05-29 10:34:26 -07:00
Kconfig fsnotify, lsm: Decouple fsnotify from lsm 2024-10-14 17:38:27 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00