You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the library consumer, i expect, that no (access, timing)-pattern creates an invalid vault structure (TODO: define what this means).
This is not the case under certain conditions. As an example:
If a shortened file is simultaneously deleted and moved, there is a short timing window, where at the destination already files were created, but the actual content file is deleted. The move fails with an exception, but the residual files are not cleaned up.
Specifically, if the moving thread is put on hold before line 600, another thread can delete the content file (because in openCryptoFiles the mapping for the old path exists). Line 600 will fail, but the filesystem nodes created in the line before are not deleted.
As the library consumer, i expect, that no (access, timing)-pattern creates an invalid vault structure (TODO: define what this means).
This is not the case under certain conditions. As an example:
If a shortened file is simultaneously deleted and moved, there is a short timing window, where at the destination already files were created, but the actual content file is deleted. The move fails with an exception, but the residual files are not cleaned up.
Specifically, if the moving thread is put on hold before line 600, another thread can delete the content file (because in openCryptoFiles the mapping for the old path exists). Line 600 will fail, but the filesystem nodes created in the line before are not deleted.
cryptofs/src/main/java/org/cryptomator/cryptofs/CryptoFileSystemImpl.java
Lines 590 to 606 in b3755f3
Another example is deleting a file, to which a new file channel is opened with the CREATE flag. TODO: elaborate once #170 is fixed.
The text was updated successfully, but these errors were encountered: