Overview

Wipefreespace is a program which securely wipes the free space of an ext2/3, NFTS, XFS and ReiserFSv3 partition, similar to how shred securely wipes the contents of files. When the rm command is run, a file/directory is not removed. Rather the only part which is removed is the pointer which indicates the location of the file. The file itself may or may not be overwritten as additional data is written to the disk. This means an attacker who gains physical access to the drive, they may be able to recover "deleted" files which could contain confidential information. Wipefreespace resolves this problem by "shredding" the free space of a partition. This is extremely useful on systems where nrm or similar utilties are not available.

Note: This page is outdated with the release of wipefreespace 0.9 (2008-06-29). This release resolves all the issues listed below. This page will remain for historic purposes, but it is recommend you upgrade to 0.9 or greater.


Problems

Wipefreespace 0.8 has two bugs which prevent it from compiliing on Fedora Core 9. The first issue is an NTFS bug. The second issue is a bug caused by not passing the proper CLFAGS to handle inline functions. I reported both of these bugs to the author, Bogdan and received notification they would resolved in the upcoming 0.9 release.


Patching for NTFS

Wipefreespace 0.8 will not compile on a Fedora Core 9 platform without NTFS errors. After sending a bug report to the author, he advised me on what change needed to be made to the src/wfs_ntfs.c file. From this information, I created a patch. The instructions below detail how to apply this patch to the 0.8 source code.

% wget -c http://rudy.mif.pg.gda.pl/~bogdro/soft/wipefreespace-0.8.tar.gz
% wget -c http://www.antagonism.org/files/wipefreespace-0.8-fc9-ntfs.patch
% tar zxvf wipefreespace-0.8.tar.gz
% cd wipefreespace-0.8
% patch -p1 < ../wipefreespace-0.8-fc9-ntfs.patch


Compiling for Ext2/3

Wipefreespace 0.8 has another problem when attempting to compile for ext3 filesystems. The linker sees many functions in bitops.h and the linker doesn't know which to choose for the program. These functions are in-lined. The below example shows the proper CFLAGS to apply to prevent this error from happening.

% CFLAGS='-D_EXT2_USE_C_VERSIONS_ -DNO_INLINE_FUNCS' ./configure
% make

After applying the above commands, you can proceed with the install as described in the INSTALL file. This page will remain here until Bogdan releases wipefreespace 0.9. At such time, I will place a notice at the top of the page informing the user to use the latest version.


Thanks

I would like to take this opportunity to thank Bogdan for his extreme professionalism and prompt response to my bug reports. Working with a developer with his attitude was a pleasure and look forward to continuing to work with him in the development of wipefreespace.


Update Regarding Capabilities Function

During my testing of wipefreespace, I noticed it would print the following warning message if you passed any option to it.

% wipefreespace
wipefreespace: Operation not permitted (error 1) during setting capabilities 'wipefreespace'

The warning message does not interfere with normal operation. However if you want to remove the warning message, you need to make the following change in wipefreespace.c and recompile the program.

The line reads...

res = wfs_clear_cap (&error);

Change it to read...

res = WFS_SUCCESS;

I informed Bogdan of the issue and he is working to resolve the issue.


Downloads

File: wipefreespace-0.8-fc9-ntfs.patch
Size: 448 bytes
Date: 2008-06-05 10:51:13 -0700
MD5: 05f3d27c067cdf6c718164bfa247dfb8
SHA-1: 8852e21ef2f08a38c244eabeb51dac434babcecb
RIPEMD-160: a25a9821d52521481fd26636c269ef69e7bd9f28
PGP Signature: wipefreespace-0.8-fc9-ntfs.patch.asc

2008-06-06 Thanks to Bogdan for helping to correct some typos on the page. I also added the "Update Regarding Capabilities Function" section.

2008-07-01 Added note regarding the release of wipefreespace 0.9 and how it resolves the above issues.