linux/fs/fuse
Tetsuo Handa a9d417e853 fuse: don't keep dead fuse_conn at fuse_fill_super().
commit 543b8f8662 upstream.

syzbot is reporting use-after-free at fuse_kill_sb_blk() [1].
Since sb->s_fs_info field is not cleared after fc was released by
fuse_conn_put() when initialization failed, fuse_kill_sb_blk() finds
already released fc and tries to hold the lock. Fix this by clearing
sb->s_fs_info field after calling fuse_conn_put().

[1] https://syzkaller.appspot.com/bug?id=a07a680ed0a9290585ca424546860464dd9658db

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: syzbot <syzbot+ec3986119086fe4eec97@syzkaller.appspotmail.com>
Fixes: 3b463ae0c6 ("fuse: invalidation reverse calls")
Cc: John Muir <john@jmuir.com>
Cc: Csaba Henk <csaba@gluster.com>
Cc: Anand Avati <avati@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-11-20 18:05:06 +00:00
..
control.c fuse: fix control dir setup and teardown 2018-11-20 18:05:06 +00:00
cuse.c fuse: pull iov_iter initializations up 2014-05-06 17:32:51 -04:00
dev.c fuse: set stolen page uptodate 2015-03-30 11:10:41 +01:00
dir.c fuse: atomic_o_trunc should truncate pagecache 2018-11-20 18:04:46 +00:00
file.c mm: drop vm_ops->remap_pages and generic_file_remap_pages() stub 2018-10-03 04:09:51 +01:00
fuse_i.h fuse: Propagate dentry down to inode_change_ok() 2017-02-23 03:53:52 +00:00
inode.c fuse: don't keep dead fuse_conn at fuse_fill_super(). 2018-11-20 18:05:06 +00:00
Kconfig fuse: Move CUSE Kconfig entry from fs/Kconfig into fs/fuse/Kconfig 2013-01-17 13:08:45 +01:00
Makefile CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00