[lkml]   [1996]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectsigning a filesystem


I've been wondering about the following scheme for making a filesystem
tamper-resistant. Would it be possible to digitally sign each inode?

My thoughts on this are currently at an early stage, but here they are for
your comments:

Files on a filesystem contain some integer number of blocks. I can, for
example, compute the md5 checksum of each block. For all the blocks in a
file (as referenced by its inode), I can compute the individual md5
checksums and then combine the result with XOR to obtain a unique footprint
for the file.

Such a footprint would be stored in the file's inode. Any change to the file
without ammending the recorded footprint could be verified by some
filesystem admin-tool. [This could be done at boot time on extra sensitive
filesystems, or periodically when the system is off-line if this is not

Because the recorded footprint is the result of XORing the individual
block checksums that combine to make the whole file, it is relatively simple
to update the footprint when a single block is modified.

new-footprint = old-footprint ^ md5(old-block) ^ md5(new-block)

At this point, it is simple to "forge" a modified footprint since md5 is a
publically available algorithm, so the above scheme would be good only
against accidental filesystem corruption.

To guard against a vandal booting from a rogue-kernel, and modifying a
filesystem before rebooting linux again, an extra element of security would
be to compute the md5 checksum of each block appended with some "secret" key
given to the kernel at boot time:

lilo: linux fs-key=BigSecret

Is this something that could be added to ext2 without too much hassle?
Perhaps someone has already thought about this? I'd be interested to hear
any comments..

Best wishes

[ For those that prefer FTP --- ]

 \ /
  Last update: 2005-03-22 13:38    [W:0.056 / U:1.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site