Commit Graph

4245 Commits

Author SHA1 Message Date
Milan Broz
7b3a341809 Use crypt_backend_memcpy in crypt backend for sensitive data. 2024-05-03 11:52:09 +00:00
Milan Broz
40e56e969c Use backend memory utils in safe memory functions. 2024-05-03 11:52:09 +00:00
Milan Broz
c5d4b845df Use zero_call_used_regs and noinline for backend memory utils and introduce crypt_backend_memcpy. 2024-05-03 11:52:09 +00:00
Milan Broz
aae5cba2b9 Add memutils.c for backend and move existing mem helpers there.
Also remove inline definitions.
2024-05-03 11:52:09 +00:00
Ondrej Kozina
bede116926 Fix various coverity issues.
Mostly INTEGER_OVERFLOW (CWE-190).
2024-05-03 11:58:35 +02:00
Milan Broz
33e26be58b Avoid divide by zero in uint64_mult_overflow.
This function is used with block size, where 0 does
not make sense, so failing the check is the simple way
to avoid sividion by zero.

In reality, this should never happen, but it was seen
in (unreproducible) fuzzing input.
2024-04-18 08:39:52 +02:00
Milan Broz
842d9e6e6e Update README for version 2.7.2. 2024-04-09 12:12:56 +02:00
Milan Broz
bc62204a41 Add warning about OPAL admin PIN to man page and release notes. 2024-04-09 10:46:13 +02:00
Milan Broz
4bd64eed82 Add 2.7.2 release notes. 2024-04-04 18:34:49 +00:00
Milan Broz
4b0ae54379 tests: print OPAL device parameters in test envirenment if specified 2024-04-04 18:34:19 +00:00
Daniel Zatovic
69920581a3 CI: add WD PC SN740 OPAL drive job 2024-04-04 14:49:27 +02:00
Antonio Ceballos
4bf6db5ce8 po: update es.po (from translationproject.org) 2024-04-04 14:08:50 +02:00
Ondrej Kozina
a89485924c Compile --disable-hw-opal variant. 2024-04-03 16:26:02 +00:00
Ondrej Kozina
0cbeb35a93 Do not check passphrase quality in-before erase.
The passphrase (Admin PIN) already exists and there's no
reason to check quiality of it.
2024-04-03 11:51:35 +00:00
Milan Broz
e17ec37341 Relicense older script to LGPL fro GPL2.0 only.
(As I am sole author here.)
2024-04-03 11:49:33 +00:00
Milan Broz
1ba758cde1 FAQ: update license version to CC BY-SA 4.0.
With email approval from Arno Wagner dated March 29, 2024:

 From: Arno Wagner
 To: Milan Broz
 Subject: Re: cryuptsetup FAQ license

  Hi Milan,

  fine for me. You can change it directly.

  Arno

  On Wed, Mar 27, 2024 at 13:38:36 CET, Milan Broz wrote:
  > Hi Arno,
  >
  > the FAQ in cryptsetup is licensed under CC-BY-SA-3.0 that is no longer a recent version - https://creativecommons.org/licenses/by-sa/3.0/
  >
  > I use CC-BY-SA-4.0 (https://creativecommons.org/licenses/by-sa/4.0/deed.en) for LUKS2 docs and think it is the best option for docs.
  >
  > Do you agree with updating the license to CC-BY-SA-4.0 for the FAQ.md file? (I, as coauthor, obviously agree :-)
  >
  > Thanks,
  > Milan
2024-04-03 11:49:33 +00:00
Ondrej Kozina
87bf39f71e Fix invalid assert for hw-opal data segment keys.
hw-opal segment does not receive volume key for data
encryption, unlike crypt segment or hw-opal-crypt segment.
It gets key encryption key that is passed to device fw which
later unlocks the locking range key sealed in the device.

The assert may be skipped while volume key is not set.

Fixes: #875.
2024-04-03 11:48:56 +00:00
Ondrej Kozina
1ae70b8c16 Fix data segment length compensation on misaligned partitions.
While properly calculated data segment needed compensation due to
misaligned partition (locking range had to be truncated),
we passed wrong value (original partition size) to LUKS2 metadata.

It has to use calculated locking range length in bytes.

Fixes: #873.
2024-04-02 14:21:01 +02:00
Daniel Zatovic
3d82771418 CI: make OPAL jobs uninterruptible 2024-03-26 16:09:22 +01:00
Ondrej Kozina
3e29dbe6f2 Add --hw-opal-factory-reset switch in erase options explicitly. 2024-03-26 12:01:27 +00:00
Ondrej Kozina
a462dbeb4e Check HW OPAL range parameters in proper units.
The opal_range_check_attributes_fd function expected both
offset and length parameters of a LR to be passed in sectors (512B).
During format we passed it wrongly in OPAL blocks which caused
bogus check provided OPAL block size was not 512B.

Fixes: #871.
2024-03-26 11:55:31 +01:00
Daniel Zatovic
8655093cb7 tests: run systemd tests using meson only when requested 2024-03-21 16:42:06 +01:00
Milan Broz
25b543d371 Update Readme for 2.7.1. 2024-03-07 15:53:23 +01:00
Milan Broz
6b3f9cd4bc tests: Fix Makefile * Meson to include all fs images. 2024-03-07 15:32:17 +01:00
Milan Broz
608e42c574 Update LUKS2 spec. 2024-03-07 15:26:54 +01:00
Milan Broz
143a76a5fa Add 2.7.1 release notes. 2024-03-07 15:23:15 +01:00
Milan Broz
9906bc40e1 test: Fix tests on RHEL7 clones (no keyring in dm-crypt). 2024-03-07 13:18:05 +00:00
Milan Broz
dc669a14d3 Add xfs V5 image to tests.
XFS V4 can be disabled in kernel, add image V5.

Minimal 300M xfs size avoided by using QA variables magic in format:
export TEST_DIR=1 TEST_DEV=1 QA_CHECK_FS=1 ; mkfs -t xfs ...
2024-03-07 11:30:21 +00:00
Ondrej Kozina
8819194281 tests: fix compat-test-opal bug for empty LUKS2 passphrase.
The bug was hidden due to previously contradicting condition.
2024-03-06 14:23:02 +01:00
Ondrej Kozina
5d6fbf7b53 tests: move luks1 decryption resume test.
It cannot be run in fips mode due to empty passphrase
is no longer allowed.
2024-03-06 13:10:34 +01:00
Ondrej Kozina
4347a01cce tests: fix fips mode detection contradiction in various tests. 2024-03-06 13:08:50 +01:00
Yuri Chornoivan
6525b40a7b po: update uk.po (from translationproject.org) 2024-03-06 09:51:20 +01:00
Remus-Gabriel Chelu
31573693a0 po: update ro.po (from translationproject.org) 2024-03-06 09:51:20 +01:00
Jakub Bogusz
accc9c0ee9 po: update pl.po (from translationproject.org) 2024-03-06 09:51:20 +01:00
Hiroshi Takekawa
5ec40f98ac po: update ja.po (from translationproject.org) 2024-03-06 09:51:20 +01:00
Frédéric Marchal
5eb9c8b27a po: update fr.po (from translationproject.org) 2024-03-06 09:51:20 +01:00
Roland Illig
eccd46206d po: update de.po (from translationproject.org) 2024-03-06 09:51:20 +01:00
Petr Pisar
8d6fc937da po: update cs.po (from translationproject.org) 2024-03-06 09:51:20 +01:00
Milan Broz
41755b71b6 Set devel version. 2024-03-06 09:51:10 +01:00
Ondrej Kozina
201a4b7d8b Add regression test for resuming LUKS1 decryption. 2024-03-05 14:58:02 +01:00
Ondrej Kozina
33b9a51fa8 Fix regression in LUKS1 decryption.
With removal of cryptsetup-reencrypt there was
a bug introduced that broke resuming interrupted
LUKS1 decryption operation. LUKS2 code was not
affected.
2024-03-05 14:58:02 +01:00
Milan Broz
9d38ea70e2 Require --debug log in bug report issue template. 2024-02-29 17:07:41 +00:00
Milan Broz
2cd0be9501 Allow all stable branches in GitHub actions. 2024-02-29 17:07:41 +00:00
Ondrej Kozina
5a0208cd06 Allow --link-vk-to-keyring with --test-passphrase option.
To make it possible to upload volume key in user specified kernel
keyring without need to (re)activate the device.
2024-02-29 16:25:17 +01:00
Ondrej Kozina
db635c428b Fix abort triggered by initializing decryption via --active-name.
The invalid test unfortunately hid an error in processing
of --active-name command line option.
2024-02-28 17:11:46 +01:00
Milan Broz
678b28989b Fix indentation in integritysetup man page and crypt description. 2024-02-22 20:58:35 +00:00
Milan Broz
82f37d7a10 Sort options in man pages alphabetically. 2024-02-22 20:58:35 +00:00
Milan Broz
cbf818a660 Fix JSON exampe in progress-frequency option. 2024-02-22 20:58:35 +00:00
Milan Broz
3ff8d55a8b Fix veritysetup man page typo. 2024-02-22 20:58:35 +00:00
Sergei Ilinykh
349572e69e Fix compilation with libargon2 argon when internal disabled
This fixes a regression introduced somewhere on the way to 2.7.0.
A specific set of options led to complete lack of Argon2
regardless of --enable-libargon2 option.
2024-02-22 20:43:35 +03:00