-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LibOS] Allow
unlink()
on corrupted encrypted files
Currently, LibOS unconditionally sets up the inode of the dentry on first lookup, for example, querying the size of the underlying file and saving it into inode fields. This setup of dentry's inode is not needed in cases like file removal (`unlink()`), since the inode will be immediately removed after it was set up. This peculiarity made it impossible to remove (unlink) corrupted encrypted files by the app itself: already the lookup of the file would fail, disallowing to proceed to the removal operation. "Corrupted" may mean an attacker-modified file or a more benign case of encrypted-with-old-key file. This commit allows to perform `unlink()` on such "corrupted" encrypted files (by keeping a "shallow" file object). A LibOS test was added. Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
- Loading branch information
Dmitrii Kuvaiskii
committed
Apr 5, 2024
1 parent
886b7f3
commit 4dae6b0
Showing
10 changed files
with
110 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
/trusted_testfile | ||
|
||
/tmp/* | ||
!/tmp/.dummy | ||
!/tmp/.gitkeep | ||
/tmp_enc/* | ||
!/tmp_enc/.dummy | ||
!/tmp_enc/.gitkeep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.