Skip to content

[v12] Secure File Removal Improvements#32433

Merged
jentfoo merged 1 commit intobranch/v12from
jent/secure-removal-improvements-v12
Sep 25, 2023
Merged

[v12] Secure File Removal Improvements#32433
jentfoo merged 1 commit intobranch/v12from
jent/secure-removal-improvements-v12

Conversation

@jentfoo
Copy link
Copy Markdown
Contributor

@jentfoo jentfoo commented Sep 22, 2023

Backport #32260 to branch/v12

* utils.RemoveSecure: Still attempt a removal after error in overwrite

As extra caution, even if an error occurs during the overwrite process, we still want to attempt a removal of sensitive files.

* keystore.go: More secure removal of keyfiles

This commit ensures that deleted keyfiles have been overwritten.  This has little value on SSD's but can improve the security when the disk is magnetic.

* Apply PR feedback, notably better testing and early unlinking if possible

This adds an OS conditional so that if possible the file will be removed and then overwritten using the previous file handle.
This will reduces the chance that the file will be witnessed with unexpected contents.
@jentfoo jentfoo added this pull request to the merge queue Sep 25, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 25, 2023
@jentfoo jentfoo added this pull request to the merge queue Sep 25, 2023
Merged via the queue into branch/v12 with commit 4f0239b Sep 25, 2023
@jentfoo jentfoo deleted the jent/secure-removal-improvements-v12 branch September 25, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants