eternaltyro / cryptsetup

Since Google code is shuttering...
http://code.google.com/p/cryptsetup
GNU General Public License v2.0
0 stars 0 forks source link

luksDump prints unsigned fields as signed #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

$ cryptsetup luksDump [attached test.hdr]

What is the expected output? What do you see instead?

Actual
LUKS header information for test.hdr

Version:        1
Cipher name:    aes
Cipher mode:    xts-plain64
Hash spec:      sha1
Payload offset: 4096
MK bits:        256
MK digest:      d0 46 6b 39 31 eb 38 34 b7 3c 67 89 ae 30 4c c9 f8 c1 9c f6 
MK salt:        16 59 51 66 92 25 e2 7b 31 84 d2 7b 66 31 28 57 
                71 27 ea 7a 9f 1c e2 bb ae 1a 41 44 07 2e de 77 
MK iterations:  -1
UUID:           12704e8e-4d7a-41f1-85df-c05f96af7d1a

Key Slot 0: ENABLED
    Iterations:             -1
    Salt:                   e9 62 bb fe 5b f3 e6 44 58 1a 50 38 0e d1 d9 ac 
                            cb 0f 7a aa 93 c8 c8 84 fc e9 76 d3 f9 f1 49 54 
    Key material offset:    8
    AF stripes:             4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

Expected
LUKS header information for test.hdr

Version:        1
Cipher name:    aes
Cipher mode:    xts-plain64
Hash spec:      sha1
Payload offset: 4096
MK bits:        256
MK digest:      d0 46 6b 39 31 eb 38 34 b7 3c 67 89 ae 30 4c c9 f8 c1 9c f6 
MK salt:        16 59 51 66 92 25 e2 7b 31 84 d2 7b 66 31 28 57 
                71 27 ea 7a 9f 1c e2 bb ae 1a 41 44 07 2e de 77 
MK iterations:  4294967295
UUID:           12704e8e-4d7a-41f1-85df-c05f96af7d1a

Key Slot 0: ENABLED
    Iterations:             4294967295
    Salt:                   e9 62 bb fe 5b f3 e6 44 58 1a 50 38 0e d1 d9 ac 
                            cb 0f 7a aa 93 c8 c8 84 fc e9 76 d3 f9 f1 49 54 
    Key material offset:    8
    AF stripes:             4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

What version of the product are you using? On what operating system?

Compiled cryptsetup-1.6.6 on Fedora 20

Please provide any additional information below.

Attached printf_changes.patch is my proposed patch.

The passphrase for the test.hdr is 'test' if that provides any additional value.

Original issue reported on code.google.com by Corban.D...@gmail.com on 24 Nov 2014 at 11:01

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by Corban.D...@gmail.com on 24 Nov 2014 at 11:40

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by gmazyl...@gmail.com on 6 Dec 2014 at 9:01

GoogleCodeExporter commented 9 years ago
Patch committed
https://code.google.com/p/cryptsetup/source/detail?r=ea8864badfbd4c3efbd56ae8f98
7e4ae7513002a#

Thanks.

(Such mangled header can be dangerous because it can iterate almost 
indefinitely but that's another issue...)

Original comment by gmazyl...@gmail.com on 15 Jan 2015 at 11:31