[Bug 232772] fusefs(4) allows rename to create directory loops
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Oct 29 01:50:33 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232772
Bug ID: 232772
Summary: fusefs(4) allows rename to create directory loops
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: asomers at FreeBSD.org
rename(2) is supposed to return EINVAL if it would create a directory loop.
This is the behavior of UFS and ZFS. However, fusefs(4) doesn't detect it.
fusefs-exfat and fusefs-ext2 both hang when you try, and a closed-source fuse
filesystem created the directory loop just fine. Steps to reproduce, with
exfat:
# truncate -s 1g /tmp/da1
# mkexfatfs /tmp/da1
mkexfatfs 1.2.7
Creating... done.
Flushing... done.
File system created successfully.
# sudo mount.exfat -d /tmp/da1 /mnt
Then in another window:
# cd /mnt
# mkdir foo
# mkdir foo/sub
# mv foo foo/sub/sub
mv: rename foo to foo/sub/sub: Operation timed out
Note that renaming foo to foo/sub correctly fails; the error only happens with
the additional level of indirection.
Tested on 12.0-ALPHA9 amd64 and TrueOS-Desktop-201803131015.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list