From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] LUKS keyslot 4 is invalid.
Date: Sun, 27 Nov 2011 13:30:11 +0100 [thread overview]
Message-ID: <20111127123011.GA11564@tansi.org> (raw)
In-Reply-To: <4ED21FF4.5020200@redhat.com>
Hi Lilan,
I will add this. The check is a pretty good idea IMO.
Arno
On Sun, Nov 27, 2011 at 12:33:08PM +0100, Milan Broz wrote:
> On 11/26/2011 07:45 PM, Milan Broz wrote:
> > On 11/26/2011 03:19 PM, Mika Kujanp?? wrote:
> >> I've tried to find information, if there is some possibility to recover access to disk. When I try luksOpen or luksDump, i get
> >>
> >> cryptsetup luksDump /dev/disk/by-uuid/7fa45e9b-6b3d-4ac7-becc-7b8fe5d463a3
> >> LUKS keyslot 4 is invalid.
> >> LUKS keyslot 5 is invalid.
>
> Perhaps another item to FAQ:
>
> In cryptsetup 1.4.x I added check of keyslot data offset.
> (Keyslot offset is calculated during format for all slots
> including inactive slots.)
>
> If any keyslot offset points to the area outside of LUKS header,
> header is corrupted (IOW keylot point to the payload data area
> and in theory can overwrite user data when activated.)
>
> And exactly this happened there, inactive slot 4 and 5 had
> wrong offset. Because there was know signature 0x55 0xAA in last
> bytes of the first sector I guess some "clever" partition tool
> wrote few bytes there after LUKS was formatted.
>
> if you run luksDump --debug here, you will see better error
> message, here e.g.
>
> # Reading LUKS header of size 1024 from device /dev/sdb
> # Invalid offset 1760061416 in keyslot 4 (beyond data area offset 4096).
> LUKS keyslot 4 is invalid.
>
>
> How to fix that depends on situation...
>
> If you have old cryptsetup, you can activate device and reformat
> the header using "How do I recover the master key
> from a mapped LUKS container?" in FAQ.
>
> With exact knowledge of LUKS header you can fix that manually.
> (I used simple dd from another device in this case but offset depends
> on situation.)
>
> Milan
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>
--
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
next prev parent reply other threads:[~2011-11-27 12:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-26 14:19 [dm-crypt] LUKS keyslot 4 is invalid Mika Kujanpää
2011-11-26 18:45 ` Milan Broz
2011-11-27 11:33 ` Milan Broz
2011-11-27 12:30 ` Arno Wagner [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-11-19 22:52 Jarosław K
2014-11-20 19:04 ` Arno Wagner
2014-11-25 21:50 ` Jarosław K
2014-11-25 23:15 ` Arno Wagner
2014-11-26 17:11 ` Jarosław K
2014-11-26 17:54 ` 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=20111127123011.GA11564@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox