summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorJunyoung Jang <graypanda.inzag@gmail.com>2026-11-17 22:51:35 +0900
committerMiklos Szeredi <mszeredi@redhat.com>2026-11-19 18:26:00 +0100
commitae932b1f5727004f585d603e0cbab7e0725c04cf (patch)
treec8c49bfcba583e452d9dd39227561a0330cd5d4f /rust/kernel/alloc
parent2eb2329f9ce7f29f227656cc2686fe6f1879d11c (diff)
fuse: skip dcache instantiation for readdirplus names with embedded NUL
FUSE READDIRPLUS can pass a length-bearing qstr with an embedded NUL to d_splice_alias(). Unlike verify_dirent_name() in fs/readdir.c, this path can create a dentry whose d_name.len extends past the NUL. For such a name, strscpy() in inotify_handle_inode_event() and the fanotify name-copy helpers stop early. The kmalloc() and kvmalloc() event-name buffers retain uninitialized bytes within the recorded name length, which copy_event_to_user() and copy_fid_info_to_user() can expose. Some FUSE servers include a terminating NUL in namelen. Follow nfs_prime_dcache() in commit 78d04af4995a1 ("NFS: nfs_prime_dcache must validate the filename") by skipping dcache instantiation without failing getdents(). Return -EIO from fuse_direntplus_link() so parse_dirplusfile() sends FUSE_FORGET for the unused lookup reference and continues readdir. Fixes: 0b05b18381ee ("fuse: implement NFS-like readdirplus support") Cc: stable@vger.kernel.org Co-developed-by: Gwanhyun Lee <gwanhyunlee@gmail.com> Signed-off-by: Gwanhyun Lee <gwanhyunlee@gmail.com> Signed-off-by: Junyoung Jang <graypanda.inzag@gmail.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions