Commit Graph

1197 Commits

Author SHA1 Message Date
Milan Broz
dfe27e4e8b Update README.md. 2017-04-27 10:48:25 +02:00
Milan Broz
0ba577666c Version 1.7.5. v1_7_5 2017-04-27 08:43:49 +02:00
Milan Broz
4e198501d7 Add 1.7.5 release notes. 2017-04-27 08:43:02 +02:00
Milan Broz
0f03d04599 Align benchmark output even for longer cipher names. 2017-04-26 14:34:38 +02:00
Harald Hoyer
8af93e19a2 dracut-reencrypt: call "udevadm settle" once more
Somehow testing in qemu resulted sometimes in an endless loop.
Either the timing or the settle fixed the issue.
When the VM was in an endless loop, an strace showed, that the first 512
and 1024 of the crypt partition was read over and over. Either it was
the udev blkid, or some device mapper udev rule.
Maybe the reencrypt tool opens and closes the device fd, where the close
triggers a udev blkid and causes the reencrypt tool to reread the device...
Anyhow.. with this settle the issue was not seen anymore.
2017-04-26 10:53:55 +02:00
Harald Hoyer
ffa035f45e dracut-reencrypt: add UUID handling to rd.luks.reencrypt=
This patch adds a udev rule, so that you can specify
rd.luks.reencrypt=<UUID> instead of rd.luks.reencrypt=<devname>

It also moves the job to the "settled" queue, which means, that it is
executed after udev has settled.
2017-04-26 10:53:45 +02:00
Harald Hoyer
3da51bba75 dracut-reencrypt: add finished hook
A finished hook prevents dracut-initqueue from exiting and lets it
finish the batched jobs. Without a "finished hook" and without
"root=<dev>" on the kernel command line, the reencrypt job would not be
executed.

Normally you want to reencrypt without a "root=<dev>" on the kernel
command and want to reboot after the reencrypt job is done.

This patch adds the missing "finished hook".
2017-04-26 10:53:30 +02:00
Milan Broz
83c42227da Fix API test for FIPS mode. 2017-04-21 14:13:06 +02:00
Milan Broz
a495563a35 Fix luksFormat if running in FIPS mode on recent kernel.
Recently introduced check for weak keys for XTS mode makes
zeroed key for algorithm check unusable.

Use random key for the test instead.
2017-04-21 14:12:50 +02:00
Milan Broz
c02c1494f7 Fix dm-verity max-size parameter. 2017-04-21 14:10:48 +02:00
Milan Broz
e91b90b8c9 Fix access to unaligned hidden TrueCrypt header.
On native 4k-sector device the old hidden header is not aligned
with hw sector size and derect-io access with SEEK_END fails.

Let's extend blockwise functions to support a negative offset
and use the same logic as normal unaligned writes.

Fixes problem mentioned in
https://gitlab.com/cryptsetup/cryptsetup/merge_requests/18
2017-04-04 16:04:49 +02:00
Milan Broz
7c25327396 Fix write_lseek prototype and avoid using void in arithmetic warning. 2017-04-04 16:04:33 +02:00
Ondrej Kozina
4dd568fbfc read_lseek_blockwise: use void pointer 2017-04-04 16:04:20 +02:00
Ondrej Kozina
d3316ec930 Slight code style improvements for blockwise functions. 2017-04-04 16:04:06 +02:00
Ondrej Kozina
b489b0aa64 Add interrupt safe read_lseek_blockwise function. 2017-04-04 16:03:53 +02:00
Ondrej Kozina
2d298071e4 Use read/write buffer functions where appropriate. 2017-04-04 16:03:39 +02:00
Ondrej Kozina
327ebccdb1 Add read_buffer and write_buffer functions.
Introduce functions for proper I/O handling. These functions
are able to deal with interrupts and partial I/O.
2017-04-04 16:03:05 +02:00
Ondrej Kozina
a6c8f974fe Avoid write with zero size.
This can happen if write buffer size is smaller than underlying
block size and initial buffer is misaligned.

Also use size_t for buffer length variables.
2017-04-04 16:01:21 +02:00
Milan Broz
bcb5d150b0 Update README.md for 1.7.4. 2017-03-15 10:56:20 +01:00
Milan Broz
640eba3569 Update copyright years. v1_7_4 2017-03-12 13:23:34 +01:00
Milan Broz
f8db1ce650 Add 1.7.4. Release notes. 2017-03-12 13:01:46 +01:00
Milan Broz
3406a6f447 Used LUKS1 compiled-in defaults also in Python wrapper. 2017-03-12 12:05:33 +01:00
Milan Broz
672db2c6b4 Update po files. 2017-03-12 12:05:08 +01:00
Milan Broz
b35b98bcd9 Update po files. 2017-03-02 09:40:14 +01:00
Milan Broz
afb7a5ce4b Set 1.7.4. version. 2017-03-02 09:38:38 +01:00
Bastien DHIVER
f3947c0109 Add hashMode parameter in CryptSetup_luksFormat() 2017-03-02 09:34:14 +01:00
Milan Broz
9067054f59 Clarify use of --size parameter. 2017-03-02 09:34:03 +01:00
Milan Broz
3b02c1e690 Fix race while allocating free loop device.
Fixes Issue #314.

Thanks to Martin Jeřábek for the report.
2017-03-02 09:33:49 +01:00
Milan Broz
945249fd02 Fix possible fd leaks after exec.
Thanks Natanael Copa for the report.
Fixes issue#313.
2017-03-02 09:33:15 +01:00
Milan Broz
68a140d0c5 Fix OpenSSL 1.1.0 compatibility
If backward-compatible API is not defined (-DOPENSSL_API_COMPAT=0x10100000L)
deprecated symbols cannot be used.

Also see https://bugs.gentoo.org/show_bug.cgi?id=604698

Thanks eroen for reporting this.
2017-03-02 09:32:52 +01:00
Milan Broz
4f223476f8 Fix TrueCrypt URL in man page. 2017-03-02 09:32:28 +01:00
Arno Wagner
2d93638302 some typos fixed in FAQ 2017-03-02 09:32:15 +01:00
Arno Wagner
25129a99eb Updates to FAQ
- Finished section 9 initrd with examples how to do your own
- Some minor fixes elswehere
2017-03-02 09:32:00 +01:00
Milan Broz
9dbce46c0f Update veritysetup man page.
Thanks Michal Virgovic for patch.
2017-03-02 09:31:37 +01:00
Milan Broz
0185defb7f Check for data device and hash device area overlap in veritysetup.
Thanks Michal Virgovic for tests.
2017-03-02 09:31:18 +01:00
Aric Belsito
50412375da Fix use of LibreSSL. 2017-03-02 09:30:09 +01:00
Milan Broz
057c88eca9 Fix missing CRYPT_ACTIVATE_SAME_CPU_CRYPT flag check in status command. 2017-03-02 09:29:08 +01:00
Milan Broz
a552ea9ac8 Update readme.md for version 1.7.3. 2016-10-30 15:03:36 +01:00
Milan Broz
25e185f6f5 Set 1.7.3 version. v1_7_3 2016-10-28 12:18:22 +02:00
Milan Broz
db09bc58fc Update 1.7.3 Release notes. 2016-10-28 12:11:40 +02:00
Milan Broz
0061ce298a Verify passphrase in cryptsetup-reencrypt when encrypting new drive. 2016-10-28 12:07:35 +02:00
Milan Broz
c8da0a76aa Fix keylength = 0 (no key) case. 2016-10-28 11:55:20 +02:00
Milan Broz
7dbb47f76a Fix crypt_generate_volume_key to use size_t for keylength. 2016-10-28 11:54:58 +02:00
Tobias Stoeckmann
d68d981f36 Avoid integer overflows during memory allocation.
It is possible to overflow integers during memory allocation with
insanely large "key bytes" specified in a LUKS header.

Although it could be argued to properly validate LUKS headers while
parsing them, it's still a good idea to fix any form of possible
overflow attacks against cryptsetup in these allocation functions.
2016-10-28 11:54:18 +02:00
Tobias Stoeckmann
f65dbd5a07 Avoid buffer overflow in uuid_or_device.
The function uuid_or_device is prone to a buffer overflow if a very long
spec has been defined. The range check happens against PATH_MAX, with
i being set to 5 (due to "UUID=" offset of spec), but "/dev/disk/by-uuid"
has been already written into device.

The difference between "/dev/disk/by-uuid" and "UUID=" is 13, therefore
the correct range check must happen against PATH_MAX - 13.
@@ -204,7 +204,7 @@ const char *uuid_or_device(const char *spec)
                strcpy(device, "/dev/disk/by-uuid/");
2016-10-28 11:52:54 +02:00
Milan Broz
2c7c527990 Add 1.7.3. Release Notes. 2016-10-28 11:18:33 +02:00
Milan Broz
3cf86ec1be Update po files. 2016-10-28 11:00:00 +02:00
Eduardo Villanueva Che
274c417e56 Fixed veritysetup bug with hash offsets bigger than 2gb.
The lseek in function write_blockwise() could return value
that is greater than integer for result so it can overflow
and fail the whole write.
[comment added by mbroz]
2016-10-22 09:34:02 +02:00
Jonas Meurer
337b20a4ed Fix several minor spelling errors found by Lintian
* lib/setup.c: miliseconds -> milliseconds
* lib/utils_wipe.c: Unsuported -> Unsupported
* man/crypsetup.8: implicitely -> implicitly
* man/veritysetup.8: verion -> version
* python/pycryptsetup.c: miliseconds -> milliseconds
2016-10-22 09:33:30 +02:00
Milan Broz
35ab06c61c Set configured default iteration time early in crypt_init constructor. 2016-10-20 14:41:15 +02:00