Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unreliable on operating systems with a write cache, cannot work on COW filesystems #2

Closed
smcv opened this issue May 19, 2016 · 2 comments

Comments

@smcv
Copy link

smcv commented May 19, 2016

skrub appears to write to the file in streaming mode, without any attempt to synchronize data (fsync()). This means that any operating system with a worthwhile implementation of write caching is likely to write the zeroes into its write cache, make a note to write the "dirty" data from the write-cache back to disk at a later time, and report success. skrub responds to this apparent success by deleting the file, at which point it is valid for the operating system to discard the dirty data from the write cache without it ever reaching the disk. Instead of fixing this, I would strongly recommend using an existing OS-specific tool such as shred or wipe which gets the OS-specific details right (to the extent that this is even possible on modern hardware and filesystems).

skrub and analogous tools such as shred and wipe also cannot possibly work on copy-on-write filesystems such as btrfs, even on hardware where traditional "secure deletion" would have worked, due to the way these filesystems are structured.

A better approach to data confidentiality is to use whole-disk encryption such as Linux LUKS or Windows BitLocker, and/or avoid having secrets ever reach the disk at all.

@Xiol
Copy link

Xiol commented May 19, 2016

Yet another example of NodeJS devs reinventing the wheel... poorly.

@dawsbot
Copy link
Owner

dawsbot commented May 19, 2016

Noted in the readme via 17eddac

@dawsbot dawsbot closed this as completed May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants