[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Security Question - Unused File Space from a file'sEOF to

From: Paul Eggert
Subject: Re: [Bug-tar] Security Question - Unused File Space from a file'sEOF to end of physical block on disk
Date: Thu, 02 Feb 2006 15:14:44 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

"Stone, Todd -Systems" <address@hidden> writes:

> Files occupy full blocks and the concern is over contents of the
> unused (slack) space between the files's EOF (End-of-File) marker
> and physical end of the data block as occupied on disk.  This unused
> data could be considered CLASSIFIED if contents aren't zeroed out.
> Does or has anyone modified GNU-TAR to clear unallocated (slack)
> space?

If I understand you correctly, you're extracting from a tar image to
disk, and the tar image contains a file with (say) 500 bytes, but the
disk blocks are 1024 bytes, so you want 'tar' to fill the extra 524
bytes with explicit zeros and then truncate the file to the proper

It shouldn't be hard to modify GNU tar to act the way that you prefer,
for your particular environment, assuming that you have access to the
necessary information.  However, there's no portable way to determine
how much slack space there is, or to clear it.  Many modern file
systems don't even have a notion of "slack space" in the sense that
you suggest.  So I doubt whether the implementation would be portable.

Anyway, this is fundamentally a file system issue, not a tar issue,
and I suggest resolving it at the file system level rather than trying
to modify every application that might want to create a file.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]