Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2008 22:49:37 +0300
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        gregoryd.freebsd@free.fr
Cc:        Jeremy Chadwick <koitsu@freebsd.org>, hackers@freebsd.org, Pieter de Boer <pieter@thedarkside.nl>, Atom Smasher <atom@smasher.org>
Subject:   Re: Zeroing sensitive memory chunks [Was: Security Flaw in Popular Disk Encryption Technologies]
Message-ID:  <F%2Bddaw3xLJM9IaFtZ1gcsmL2rAE@TcVCwvrgYu/k%2BEI2cCTuSb7Kono>
In-Reply-To: <1204051337.47c45d89ea6eb@imp.free.fr>
References:  <20080223010856.7244.qmail@smasher.org> <47C068B5.2090000@thedarkside.nl> <20080223185620.GA98105@eos.sc1.parodius.com> <CHndeNGUDnyFiyFuhzNdulGXPe8@nE9n69L2PrcQKa%2Be6OgU6kZtlVg> <1204051337.47c45d89ea6eb@imp.free.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
Gregory, good day.

Tue, Feb 26, 2008 at 07:42:17PM +0100, gregoryd.freebsd@free.fr wrote:
> Quoting Eygene Ryabinkin <rea-fbsd@codelabs.ru>:
> 
> > *) New function OPENSSL_cleanse(), which is used to cleanse a section of
> >    memory from it's contents.  This is done with a counter that will
> >    place alternating values in each byte.  This can be used to solve
> >    two issues: 1) the removal of calls to memset() by highly optimizing
> >    compilers, and 2) cleansing with other values than 0, since those can
> >    be read through on certain media, for example a swap space on disk.
> >    [Geoff Thorpe]
> >
> > The '1)' is what I was talking about.  '2)' is not very clear to
> > me now, I should research what Geoff meant.  If anyone has an idea,
> > please comment.
>
> I thought it might mean that on certain media, such as disks, data
> can be read even after it has been overwriten a certain number of
> times (magnetic properties of the media, this is a method used by
> some police labs to recover lost data, I've been told, but maybe
> the man was just a paranoid).  So even "cleansing" a crypted swap
> space this way would not render it safe (you would have to repeat
> it enough times so that the layers are definitively overwritten)

Yes, Geoff just responded to my private question: it was Peter
Gutmann, who pointed him to the thing you're talking about.  There
is a paper by Peter,
  http://www.usenix.org/publications/library/proceedings/sec96/full_papers/gutmann/

I still don't understand how cleaning of a memory area will help
to clean the swapped page, but may be there are some systems which
will update the swapped page on the memory access.  May be this
even called 'read-through' -- I really don't know.

Perhaps this will help for the memory-mapped files, but may be not:
the system's write cache can collapse many successive overwrites
to just one.  The mmap'ped files are using the write cache, aren't
they?

Thanks for the comment!
-- 
Eygene



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F%2Bddaw3xLJM9IaFtZ1gcsmL2rAE>