1
0
Fork 0
alistair23-linux/fs/fuse
Miklos Szeredi 5d069dbe8a fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):

  The reproducer opens a directory on FUSE filesystem, it then attaches
  dnotify mark to the open directory.  After that a fuse_do_getattr() call
  finds that attributes returned by the server are inconsistent, and calls
  make_bad_inode() which, among other things does:

          inode->i_mode = S_IFREG;

  This then confuses dnotify which doesn't tear down its structures
  properly and eventually crashes.

Avoid calling make_bad_inode() on a live inode: switch to a private flag on
the fuse inode.  Also add the test to ops which the bad_inode_ops would
have caught.

This bug goes back to the initial merge of fuse in 2.6.14...

Reported-by: syzbot+f427adf9324b92652ccc@syzkaller.appspotmail.com
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Tested-by: Jan Kara <jack@suse.cz>
Cc: <stable@vger.kernel.org>
2020-12-10 15:33:14 +01:00
..
Kconfig virtiofs: implement dax read/write operations 2020-09-10 11:39:23 +02:00
Makefile virtiofs: add a mount option to enable dax 2020-09-10 11:39:22 +02:00
acl.c fuse: fix bad inode 2020-12-10 15:33:14 +01:00
control.c fuse: split fuse_mount off of fuse_conn 2020-09-18 15:17:41 +02:00
cuse.c fuse: split fuse_mount off of fuse_conn 2020-09-18 15:17:41 +02:00
dax.c fuse: split fuse_mount off of fuse_conn 2020-09-18 15:17:41 +02:00
dev.c fuse: split fuse_mount off of fuse_conn 2020-09-18 15:17:41 +02:00
dir.c fuse: fix bad inode 2020-12-10 15:33:14 +01:00
file.c fuse: fix bad inode 2020-12-10 15:33:14 +01:00
fuse_i.h fuse: fix bad inode 2020-12-10 15:33:14 +01:00
inode.c fuse: fix bad inode 2020-12-10 15:33:14 +01:00
readdir.c fuse: fix bad inode 2020-12-10 15:33:14 +01:00
virtio_fs.c virtiofs: clean up error handling in virtio_fs_get_tree() 2020-11-11 17:22:32 +01:00
xattr.c fuse: fix bad inode 2020-12-10 15:33:14 +01:00