linux-stable/Documentation/device-mapper
Mikulas Patocka 26b30d36cb dm integrity: conditionally disable "recalculate" feature
commit 5c02406428 upstream.

Otherwise a malicious user could (ab)use the "recalculate" feature
that makes dm-integrity calculate the checksums in the background
while the device is already usable. When the system restarts before all
checksums have been calculated, the calculation continues where it was
interrupted even if the recalculate feature is not requested the next
time the dm device is set up.

Disable recalculating if we use internal_hash or journal_hash with a
key (e.g. HMAC) and we don't have the "legacy_recalculate" flag.

This may break activation of a volume, created by an older kernel,
that is not yet fully recalculated -- if this happens, the user should
add the "legacy_recalculate" flag to constructor parameters.

Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Daniel Glockner <dg@emlix.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-30 13:32:13 +01:00
..
cache-policies.txt dm cache: fix grammar in cache-policies.txt 2018-01-17 09:16:07 -05:00
cache.txt dm cache: Documentation: update default migration_throttling value 2018-01-30 16:55:47 -05:00
delay.txt dm delay: add flush as a third class of IO 2018-07-27 15:24:19 -04:00
dm-crypt.txt dm crypt: optionally support larger encryption sector size 2017-03-24 15:54:21 -04:00
dm-flakey.txt
dm-integrity.txt dm integrity: conditionally disable "recalculate" feature 2021-01-30 13:32:13 +01:00
dm-io.txt
dm-log.txt
dm-queue-length.txt
dm-raid.txt dm raid: bump target version, update comments and documentation 2018-09-06 17:07:58 -04:00
dm-service-time.txt
dm-uevent.txt
dm-zoned.txt dm zoned: drive-managed zoned block device target 2017-06-19 11:05:20 -04:00
era.txt
kcopyd.txt
linear.txt
log-writes.txt
persistent-data.txt
snapshot.txt dm snapshot: improve documentation relative to origin suspend requirements 2018-01-17 09:16:06 -05:00
statistics.txt
striped.txt
switch.txt
thin-provisioning.txt dm thin: include metadata_low_watermark threshold in pool status 2018-07-30 11:49:08 -04:00
unstriped.txt dm: add unstriped target 2018-01-17 09:16:00 -05:00
verity.txt dm verity: add 'check_at_most_once' option to only validate hashes once 2018-04-03 15:04:29 -04:00
writecache.txt dm writecache: support optional offset for start of device 2018-07-02 16:14:02 -04:00
zero.txt