All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Corrupted luks partition, help needed
Date: Fri, 4 Jun 2010 00:07:11 +0200	[thread overview]
Message-ID: <20100603220711.GA11984@tansi.org> (raw)
In-Reply-To: <20100603204818.GC26862@maude.comedia.it>

On Thu, Jun 03, 2010 at 10:48:18PM +0200, Luca Berra wrote:
> On Thu, Jun 03, 2010 at 10:14:53PM +0200, Arno Wagner wrote:
>> On Thu, Jun 03, 2010 at 09:05:59PM +0300, Panagiotis Malakoudis wrote:
>>> OK, I looked a bit more inside LUKS specification and I now know that the
>>> 128KB keyslot is actually the 32byte master key AF-split to 128KB and then
>>> encoded with my key. A single bit of change in these 128KB makes key
>>> invalid.
>>>
>>> Now that I know all this, I consider the LUKS format fundamentally flawed to
>>> data corruption. 
>>
>> It is. However this area should not be written by anything except
>> cryoptsetup. If you look closely basically every filesystem
>> and partition scheme is about as vulnerable. The thing is,
>> modern disks do not suffer single bit corruption easily. More
>> likely are whole lost sectors. 
>
> well, actually if you look closely at modern filesystems and
> partitioning schemes, you will find there are more than one copy of
> critical metadata.
> ext2 has a backup superblock GPT partition has a secondary header and 
> table at the other end of the
> disk
>
> we really miss an on-disk backup of the LUKS header.

However the partition table does not have a backup at all.

It is a trade-off. Security-wise, an on-disk backup is a risk.
Makeing a backup manually is not that hard. Maybe a function
on cryptsetup or a contributed script could make it easier,
but that is about it. If you do, on the other hand, a
sector-wise backup of the encrypted partition, you not only
get the LUKS header, but also protect all the data against
a disk failure. Keeping in mind that disk failure roughly
has 5% annual probability per disk, that backup is
non-optional in the first place....

Arno
-- 
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name 
GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
----
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier 

  parent reply	other threads:[~2010-06-03 22:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-03 15:32 [dm-crypt] Corrupted luks partition, help needed Panagiotis Malakoudis
2010-06-03 15:51 ` Milan Broz
2010-06-03 16:16   ` Panagiotis Malakoudis
2010-06-03 18:12     ` Milan Broz
2010-06-03 18:05   ` Panagiotis Malakoudis
2010-06-03 20:14     ` Arno Wagner
2010-06-03 20:48       ` Luca Berra
2010-06-03 20:56         ` Christoph Anton Mitterer
2010-06-03 22:07         ` Arno Wagner [this message]
2010-06-04  6:05           ` Panagiotis Malakoudis
2010-06-04  8:54             ` Roscoe
2010-06-06 19:57           ` [dm-crypt] cryptsetup administration tool Ali Reza Sajedi

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=20100603220711.GA11984@tansi.org \
    --to=arno@wagner.name \
    --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.