opnsense-src/tests/sys/fs/fusefs
Alan Somers 1f44d1861a fusefs: handle evil servers that return illegal inode numbers
* If during FUSE_CREATE, FUSE_MKDIR, etc the server returns the same
  inode number for the new file as for its parent directory, reject it.
  Previously this would triggers a recurse-on-non-recursive lock panic.

* If during FUSE_LINK the server returns a different inode number for
  the new name as for the old one, reject it.  Obviously, that can't be
  a hard link.

* If during FUSE_LOOKUP the server returns the same inode number for the
  new file as for its parent directory, reject it.  Nothing good can
  come of this.

PR:		263662
Reported by:	Robert Morris <rtm@lcs.mit.edu>
Reviewed by:	pfg
Differential Revision: https://reviews.freebsd.org/D35128

(cherry picked from commit 0bef4927ea)
2022-06-18 08:16:20 -06:00
..
access.cc Fix issues with FUSE_ACCESS when default_permissions is disabled 2020-05-22 18:11:17 +00:00
allow_other.cc fusefs: annotate more file descriptor leaks in the tests 2022-05-23 13:11:19 -06:00
bmap.cc fusefs tests: Remove an unused variable. 2022-06-17 22:35:16 +03:00
cache.cc fusefs: update atime on reads when using cached attributes 2021-12-14 15:15:53 -07:00
copy_file_range.cc fusefs: annotate more file descriptor leaks in the tests 2022-05-23 13:11:19 -06:00
create.cc fusefs: handle evil servers that return illegal inode numbers 2022-06-18 08:16:20 -06:00
default_permissions.cc fusefs: implement VOP_ALLOCATE 2022-01-17 18:13:28 -07:00
default_permissions_privileged.cc fusefs: fix two small bugs in the tests' expectations 2020-05-08 23:00:02 +00:00
destroy.cc fusefs: fix two bugs regarding VOP_RECLAIM of the root inode 2022-04-29 11:16:00 -06:00
dev_fuse_poll.cc fusefs: fix two bugs regarding VOP_RECLAIM of the root inode 2022-04-29 11:16:00 -06:00
fallocate.cc fusefs: implement VOP_ALLOCATE 2022-01-17 18:13:28 -07:00
fifo.cc fusefs: coverity cleanup in the tests 2019-09-06 19:50:45 +00:00
flush.cc fusefs: fix two bugs regarding fcntl file locks 2021-04-08 02:15:42 +00:00
forget.cc fusefs: fix two bugs regarding VOP_RECLAIM of the root inode 2022-04-29 11:16:00 -06:00
fsync.cc fusefs: fix fsync for files with multiple open handles 2020-03-09 01:57:21 +00:00
fsyncdir.cc fusefs: skip some tests when unsafe aio is disabled 2019-08-13 15:52:28 +00:00
getattr.cc fusefs: correctly handle an inode that changes file types 2022-01-02 19:36:38 -07:00
interrupt.cc fusefs: coverity cleanup in the tests 2019-09-06 19:50:45 +00:00
io.cc fusefs: update atime on reads when using cached attributes 2021-12-14 15:15:53 -07:00
last_local_modify.cc fusefs: annotate more file descriptor leaks in the tests 2022-05-23 13:11:19 -06:00
link.cc fusefs: handle evil servers that return illegal inode numbers 2022-06-18 08:16:20 -06:00
locks.cc fusefs: correctly set lock owner during FUSE_SETLK 2021-07-27 11:44:28 -06:00
lookup.cc fusefs: handle evil servers that return illegal inode numbers 2022-06-18 08:16:20 -06:00
lseek.cc fusefs: annotate more file descriptor leaks in the tests 2022-05-23 13:11:19 -06:00
Makefile fusefs: implement VOP_ALLOCATE 2022-01-17 18:13:28 -07:00
mkdir.cc fusefs: handle evil servers that return illegal inode numbers 2022-06-18 08:16:20 -06:00
mknod.cc fusefs: handle evil servers that return illegal inode numbers 2022-06-18 08:16:20 -06:00
mockfs.cc fusefs: use the fsname mount option if set 2022-05-23 13:11:11 -06:00
mockfs.hh fusefs: use the fsname mount option if set 2022-05-23 13:11:11 -06:00
mount.cc fusefs: use the fsname mount option if set 2022-05-23 13:11:11 -06:00
nfs.cc fusefs: add SVN Keywords to the test files 2019-08-13 15:49:40 +00:00
notify.cc [skip ci] fix typo in comment in the fusefs tests 2020-03-09 00:14:09 +00:00
open.cc fusefs: annotate more file descriptor leaks in the tests 2022-05-23 13:11:19 -06:00
opendir.cc fusefs: implement FUSE_NO_OPEN_SUPPORT and FUSE_NO_OPENDIR_SUPPORT 2021-12-06 21:51:55 -07:00
read.cc [skip ci] fusefs: delete a stray comment from 91972cfcdd 2022-03-02 16:37:25 -07:00
readdir.cc fusefs: set d_off during VOP_READDIR 2021-03-21 02:00:33 +00:00
readlink.cc fusefs: add SVN Keywords to the test files 2019-08-13 15:49:40 +00:00
release.cc fusefs: fix two bugs regarding fcntl file locks 2021-04-08 02:15:42 +00:00
releasedir.cc fusefs tests: quell Coverity "Argument cannot be negative" warnings 2020-10-02 17:06:05 +00:00
rename.cc fusefs: fix a cached attributes bug during directory rename 2022-03-09 09:59:49 -07:00
rmdir.cc Fix issues with FUSE_ACCESS when default_permissions is disabled 2020-05-22 18:11:17 +00:00
setattr.cc Explicitly include semaphore.h for struct _sem in fusefs setattr test 2022-02-09 18:26:08 +01:00
statfs.cc fusefs: add SVN Keywords to the test files 2019-08-13 15:49:40 +00:00
symlink.cc fusefs: handle evil servers that return illegal inode numbers 2022-06-18 08:16:20 -06:00
unlink.cc Fix issues with FUSE_ACCESS when default_permissions is disabled 2020-05-22 18:11:17 +00:00
utils.cc fusefs: use the fsname mount option if set 2022-05-23 13:11:11 -06:00
utils.hh fusefs: use the fsname mount option if set 2022-05-23 13:11:11 -06:00
write.cc fusefs: correctly handle servers that report too much data written 2022-05-12 14:39:47 -06:00
xattr.cc Fix issues with FUSE_ACCESS when default_permissions is disabled 2020-05-22 18:11:17 +00:00