android_kernel_motorola_sm6375/fs/fuse
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Miklos Szeredi 732251cabe fuse: fix bad inode
[ Upstream commit 5d069dbe8aaf2a197142558b6fb2978189ba3454 ]

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: [email protected]
Signed-off-by: Miklos Szeredi <[email protected]>
Tested-by: Jan Kara <[email protected]>
Cc: <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-01-09 13:44:54 +01:00
..
acl.c fuse: fix bad inode 2021-01-09 13:44:54 +01:00
control.c
cuse.c
dev.c fuse: fix page dereference after free 2020-11-01 12:01:05 +01:00
dir.c fuse: fix bad inode 2021-01-09 13:44:54 +01:00
file.c fuse: fix bad inode 2021-01-09 13:44:54 +01:00
fuse_i.h fuse: fix bad inode 2021-01-09 13:44:54 +01:00
inode.c fuse: fix bad inode 2021-01-09 13:44:54 +01:00
Kconfig
Makefile
readdir.c fuse: fix bad inode 2021-01-09 13:44:54 +01:00
virtio_fs.c virtiofs: schedule blocking async replies in separate worker 2020-06-24 17:50:21 +02:00
xattr.c fuse: fix bad inode 2021-01-09 13:44:54 +01:00