[LU-14629] Prevent file renaming from encrypted to unencrypted dir Created: 22/Apr/21 Updated: 01/Oct/21 Resolved: 01/Oct/21 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.0 |
| Fix Version/s: | Lustre 2.15.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Sebastien Buisson | Assignee: | Sebastien Buisson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | encryption, patch, sec | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
fscrypt allows renaming an encrypted file from an encrypted directory to an unencrypted directory, according to the documentation at:
However, it seems odd to allow such a rename. Indeed, once the encrypted file has been renamed into the unencrypted directory, it does remain encrypted: it keeps its flags saying it is encrypted, its content remains encrypted (because file data has not been touched by rename), and only its name appears in clear text. As such, access to the file is possible only with the key, even if it sits into an unencrypted directory. And the only way to input the key is to unlock the encrypted dir from which the file is originating. Of course, there is no obvious relationship between the renamed file and its original directory, and only the one who proceeded to the rename might have this information. Taking this into consideration, I would like to submit a patch in llite that prevents a file in an encrypted directory from being renamed into an unencrypted directory. |
| Comments |
| Comment by Gerrit Updater [ 22/Apr/21 ] |
|
Sebastien Buisson (sbuisson@ddn.com) uploaded a new patch: https://review.whamcloud.com/43404 |
| Comment by Gerrit Updater [ 02/Jun/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43404/ |
| Comment by Peter Jones [ 02/Jun/21 ] |
|
Landed for 2.15 |
| Comment by Sebastien Buisson [ 27/Sep/21 ] |
|
An issue was found with patch https://review.whamcloud.com/43908. We intentionally forbid file and directory rename from encrypted to unencrypted directory. But we must not block rename of the topmost encrypted directory. |
| Comment by Gerrit Updater [ 27/Sep/21 ] |
|
"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/45054 |
| Comment by Gerrit Updater [ 01/Oct/21 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45054/ |