alistair23-linux/fs/fuse
Chirantan Ekbote 31070f6cce fuse: Fix parameter for FS_IOC_{GET,SET}FLAGS
The ioctl encoding for this parameter is a long but the documentation says
it should be an int and the kernel drivers expect it to be an int.  If the
fuse driver treats this as a long it might end up scribbling over the stack
of a userspace process that only allocated enough space for an int.

This was previously discussed in [1] and a patch for fuse was proposed in
[2].  From what I can tell the patch in [2] was nacked in favor of adding
new, "fixed" ioctls and using those from userspace.  However there is still
no "fixed" version of these ioctls and the fact is that it's sometimes
infeasible to change all userspace to use the new one.

Handling the ioctls specially in the fuse driver seems like the most
pragmatic way for fuse servers to support them without causing crashes in
userspace applications that call them.

[1]: https://lore.kernel.org/linux-fsdevel/20131126200559.GH20559@hall.aurel32.net/T/
[2]: https://sourceforge.net/p/fuse/mailman/message/31771759/

Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Fixes: 59efec7b90 ("fuse: implement ioctl support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2020-07-15 14:18:20 +02:00
..
acl.c
control.c
cuse.c fuse: use true,false for bool variable 2020-02-06 16:39:28 +01:00
dev.c fuse update for 5.8 2020-06-09 15:48:24 -07:00
dir.c fuse: always allow query of st_dev 2020-05-19 14:50:37 +02:00
file.c fuse: Fix parameter for FS_IOC_{GET,SET}FLAGS 2020-07-15 14:18:20 +02:00
fuse_i.h fuse: optimize writepages search 2020-05-19 14:50:38 +02:00
inode.c fuse: reject options on reconfigure via fsconfig(2) 2020-07-14 14:45:41 +02:00
Kconfig docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
Makefile virtio-fs: Change module name to virtiofs.ko 2019-10-14 10:20:33 +02:00
readdir.c fuse: use true,false for bool variable 2020-02-06 16:39:28 +01:00
virtio_fs.c virtiofs: do not use fuse_fill_super_common() for device installation 2020-05-19 14:50:37 +02:00
xattr.c