All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: sven@whgl.uni-frankfurt.de, dm-crypt@saout.de
Subject: Re: [dm-crypt] [ANNOUNCE] cryptsetup 1.6.4
Date: Sat, 01 Mar 2014 09:35:07 +0100	[thread overview]
Message-ID: <53119BBB.4060006@gmail.com> (raw)
In-Reply-To: <efa6ae0d61d5c8191398549351e4a882.squirrel@ssl.verfeiert.org>

On 03/01/2014 08:39 AM, Sven Eschenberg wrote:
> Another things that crossed my mind:
> 
> Currently the FAQ states in respect to the whirpool problem, to do a
> header backup prior to changing the header or using reencrypt. Wouldn't it
> be better to make this a minimum requirement and recommend a full backup
> instead? Imagine for whatever reason some portion after the payload offset
> gets damaged/overwritten, be it by mixing up numbers or because of any
> unobvious bug somewhere.

Yes. But even better is to do this on backup header file (do not even try to touch
device), try with detached --header for open and once it works, put it back.
But this is way more complicated (but safe).


For the automatic repair, I was thinking about it, there are few more more points:

- there is no way how to check that keyslot uses flawed whirlpool
(except to check both and only if we get correct key with flawed on we know for sure).

In the beginning we only now that it is currently running on system
with flawed or fixed gcrypt. (It says nothing about where it was formatted.)
Slowing down all users is not option for me. And luksOpen should not
write anything to header.
(And I know RHEL did another backported fix for old gcrypt whit checks some
environment variable... So the logic will not work there.)

- other backends (like OpenSSL) do no have this problem, you will
never be able to open such device there.

- it is very rare problem (Arch is more affected by it because someone
suggested this hash on some installation page, copy&paste problem.)
(I would say - this is a good lesson to think why there are safe defaults
and why you should not change encryption parameters without good reason :-)

- the fix I implemented (specific name) is isolated in gcrypt backend,
all other backends will reject it as unknown hash instead of trying
(correctly, they have no such flawed algorithm) and people clearly
see it from header that something is wrong.

So the additional option I considered is to add some option to "repair"
or reencrypt command (user must run it explicitly).

TBH I do not think it is worth to do it. If we have more reports,
I would prefer specific script which will wrap command safely.


And definitely we need to compile cryptsetup with gcrypt 1.6.1
for this exercise, it is still not common in distros.

(BTW anyone from Gentoo here? Gcrypt 1.6.1 is masked out globally and
all I get to my query was it doesn't boot and "there's some other rather
nasty bugreports filed for newer cryptsetup". No more info...)

Milan

  reply	other threads:[~2014-03-01  8:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 14:39 [dm-crypt] [ANNOUNCE] cryptsetup 1.6.4 Milan Broz
2014-02-27 17:30 ` Thomas Bächler
2014-02-28  7:51   ` Milan Broz
2014-02-28 11:29   ` Milan Broz
2014-02-28 11:38     ` Arno Wagner
2014-02-28 21:26     ` Sven Eschenberg
2014-02-28 21:46       ` Arno Wagner
2014-02-28 22:06         ` Sven Eschenberg
2014-02-28 23:27           ` Arno Wagner
2014-03-01  7:39             ` Sven Eschenberg
2014-03-01  8:35               ` Milan Broz [this message]
2014-03-01 11:32                 ` Sven Eschenberg
2014-03-01 16:50                 ` Heinz Diehl
2014-03-01 19:44                   ` Arno Wagner
2014-03-02  7:35                     ` Heinz Diehl
2014-03-02 15:17                       ` Arno Wagner
2014-03-01 13:50               ` Arno Wagner
2014-02-27 21:44 ` Heinz Diehl
2014-02-27 22:36   ` 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=53119BBB.4060006@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=sven@whgl.uni-frankfurt.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.