All of lore.kernel.org
 help / color / mirror / Atom feed
From: alban bernard <alban.bernard@yahoo.fr>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] simple ideas addressing ssd TRIM security concern
Date: Sat, 14 Apr 2012 23:22:15 +0100 (BST)	[thread overview]
Message-ID: <1334442135.91023.YahooMailClassic@web171303.mail.ir2.yahoo.com> (raw)
In-Reply-To: <20120414041511.GA7142@tansi.org>

--- On Sat, 4/14/12, Arno Wagner <arno@wagner.name> wrote:
> The Design "error" is of course that the raw device is told
> about
> some things that should only be visible after decryption.
>

In a way, TRIMing leads to the same situation as not writing garbage before device encryption.

> The information leakage is very small. If it is a concern,
> then TRIM must never be used. If not, TRIM can be used in
> unlimited
> fashion. It is a standard security trade-off. Your options
> can
> in some circumstances decrease the information lekage, but
> they
> will not so so reliably (comments below), and hence do not
> reduce
> the worst-case. But the risk-analysis that form the basis of
> the
> decision to allow TRIM or not has to use the worst-case as
> there
> is no basis for forming an average-case and an attacker may
> be able
> to provoke the worst-case scenario.

In case the user chooses the performance trade-off, an option to maximize security is still interesting to him. I agree with you, a layer that cryptographically randomize TRIMed blocks while limiting information leakage is not a key point to decide to allow TRIM or not (the worst case is still possible), but it is still important to have the option from the user perspective.

> > - randomize device usage pattern when choosing blocks
> to TRIM (hide
> >   filesystem)
>
> I don't quite understand how that could work, do you mean to
> have
> a random mapping between encrypted and hysical secors? That
> would
> kill performance a lot worse than not using TRIM in the
> first place.
>

I meant to randomly distribute TRIMed blocks across the device by choosing to not TRIM contiguous blocks of some files. E.g. when a big file is deleted, allow TRIM only on a randomly chosen set of its blocks limited to about 1 percent of its size. The 99 percent of it would stay unTRIMed on the device.

So, these ideas could only limit the information leakage that could be used by an attacker. To complete my understanding, if the device is completely used (no more free space), an attacker could not benefit of any leakage from TRIMed space. So, there is a relation between information leakage rate and amount of TRIMed space. A question rises to me: does an amount of TRIMed space exist to keep performance and still harden crypto-analysis in a controllable manner?

  reply	other threads:[~2012-04-14 22:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-14  1:23 [dm-crypt] simple ideas addressing ssd TRIM security concern alban bernard
2012-04-14  4:15 ` Arno Wagner
2012-04-14 22:22   ` alban bernard [this message]
2012-04-15  1:26     ` Arno Wagner
2012-04-15 14:55     ` Sven Eschenberg
2012-04-15 16:55       ` alban bernard
2012-04-15 22:48         ` Sven Eschenberg
2012-04-16  0:28           ` alban bernard
2012-04-16  2:43             ` Arno Wagner
2012-04-16 19:53               ` Heinz Diehl
2012-04-17  2:48                 ` Arno Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334442135.91023.YahooMailClassic@web171303.mail.ir2.yahoo.com \
    --to=alban.bernard@yahoo.fr \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.