diff options
author | Amir Goldstein <amir73il@gmail.com> | 2025-06-27 12:48:35 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2025-06-27 19:17:26 +0200 |
commit | 8631e01c2c5d1fe6705bcc0d733a0b7a17d3daac (patch) | |
tree | 7848f3dcbd213abd23a7c076a7dc528a0432d256 /rust/helpers/device.c | |
parent | e540341508ce2f6e27810106253d5de194b66750 (diff) |
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: 7cdafe6cc4a6 ("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
Diffstat (limited to 'rust/helpers/device.c')
0 files changed, 0 insertions, 0 deletions