[Gllug] Editors

home at alexhudson.com home at alexhudson.com
Sat Jul 28 22:31:37 UTC 2001


On Sat, Jul 28, 2001 at 09:25:14PM +0100, David Freeman wrote:
> > You could use the -n option to stop vim writing a swapfile, if you're
> > worried about plaintext in the swapfile.
> 
> I think I will do so.

Jesus, rampant paranoia.... let me fuel the flames a little. Unless vim
protects its allocated via mprotect, mlock, et al, then your plain pages
could get written to swap (editors are easy prey, 'specially with 2.4's
aggressive swapping), from where they could be later retrieved. You're also
susceptible to a watcher running in a higher processor ring than Linux (a la
vmWare), so you'd better do more than memfrob() the area. But even if you're
encrypting the area, you need to protect the key/pad/whatever you used to do
it, since someone could just snarf the memory and the secret and they have
it anyway. Which leads you back to the memory protection problem.

Of course, the file is also partially available in video RAM, so you'll have
to lock and protect that too. And you'll want to make sure that the program
is statically linked, unless you trust the gcc on that machine. And you'll
want to check for keyboard interrupt catchers too (i.e, the OS), because
otherwise someone could reconstruct your edits from your input. Do you trust
the OS?

> Does anyone know if it is possible to recover data from RAM after it
> has been powere down, much like data is recoverable from a HDD after it
> has been deleted?

Not after a short length of time. But you wouldn't need to - I would bet
there are _much_ easier ways to get at this data you seem to want to protect
so bad :)

Cheers,

Alex.

-- 

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list