linux-stable/fs/fuse
Miklos Szeredi 4bef9a6a75 fuse: ioctl: translate ENOSYS in outarg
commit 6a567e920f upstream.

Fuse shouldn't return ENOSYS from its ioctl implementation. If userspace
responds with ENOSYS it should be translated to ENOTTY.

There are two ways to return an error from the IOCTL request:

 - fuse_out_header.error
 - fuse_ioctl_out.result

Commit 02c0cab8e7 ("fuse: ioctl: translate ENOSYS") already fixed this
issue for the first case, but missed the second case.  This patch fixes the
second case.

Reported-by: Jonathan Katz <jkatz@eitmlabs.org>
Closes: https://lore.kernel.org/all/CALKgVmcC1VUV_gJVq70n--omMJZUb4HSh_FqvLTHgNBc+HCLFQ@mail.gmail.com/
Fixes: 02c0cab8e7 ("fuse: ioctl: translate ENOSYS")
Cc: <stable@vger.kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 08:56:35 +02:00
..
acl.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
control.c fuse: Remove the control interface for virtio-fs 2022-07-21 16:06:19 +02:00
cuse.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
dax.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
dev.c fuse_dev_ioctl(): switch to fdget() 2023-04-20 22:55:35 -04:00
dir.c fuse: revalidate: don't invalidate if interrupted 2023-07-27 08:56:33 +02:00
file.c iov_iter: add iter_iovec() helper 2023-03-30 08:12:29 -06:00
fuse_i.h fuse update for 6.3 2023-02-27 09:53:58 -08:00
inode.c fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT 2023-07-27 08:56:34 +02:00
ioctl.c fuse: ioctl: translate ENOSYS in outarg 2023-07-27 08:56:35 +02:00
Kconfig dax: remove CONFIG_DAX_DRIVER 2021-12-04 08:58:51 -08:00
Makefile fuse: move ioctl to separate source file 2021-04-12 15:04:30 +02:00
readdir.c fs/fuse: Replace kmap() with kmap_local_page() 2022-11-23 09:10:49 +01:00
virtio_fs.c virtio_fs: Modify format for virtio_fs_direct_access 2022-07-26 10:38:58 +02:00
xattr.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00