Closed wfvining closed 8 years ago
I have a fix for this in the branch issue-155
. This needs integration testing and a discussion of whether it is a security issue since it circumvents the CHECK_PERMS
call in the case of a deleted directory (when the kernel passes path="-"
).
There is no way to check the permissions in this case since there is no path, and closedir on a DIR*
that refers to a deleted directory will not affect the metadata (it will neither read nor write in the mdfs).
The issue was that we potentially skip the R_META test in marfs_releasedir(). However, that seems fine as there was already an RM test in opendir(), and an RM|WM test in rmdir(). If the rmdir test failed, the directory won't have been deleted and closing the dirp in releasedir won't hurt.
Resolved: e077973
FUSE fails to close directories after deleting them when user executes
rm -r ./bar/
. For example:The directory remains open whether or not it was empty when it was deleted.
This issue appears with and without MDAL enabled. If the directory is empty and the user executes
rmdir ./foo/
then the directory is closed.Eventually the fuse daemon will run out of file descriptors and stop working.