linux_dsm_epyc7002/Documentation/admin-guide/device-mapper
Mikulas Patocka 9cb683c3c4 dm integrity: conditionally disable "recalculate" feature
commit 5c02406428d5219c367c5f53457698c58bc5f917 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-27 11:54:55 +01:00
..
cache-policies.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
cache.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
delay.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
dm-clone.rst dm: add clone target 2019-09-12 09:32:31 -04:00
dm-crypt.rst dm crypt: document encrypted keyring key option 2020-09-22 13:25:58 -04:00
dm-dust.rst dm dust: add interface to list all badblocks 2020-07-20 11:17:41 -04:00
dm-ebs.rst dm: add emulated block size target 2020-05-15 10:29:35 -04:00
dm-flakey.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
dm-init.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
dm-integrity.rst dm integrity: conditionally disable "recalculate" feature 2021-01-27 11:54:55 +01:00
dm-io.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
dm-log.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
dm-queue-length.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
dm-raid.rst Replace HTTP links with HTTPS ones: LVM 2020-07-05 14:28:27 -06:00
dm-service-time.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
dm-uevent.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
dm-zoned.rst Replace HTTP links with HTTPS ones: LVM 2020-07-05 14:28:27 -06:00
era.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
index.rst docs: device-mapper: add dm-ebs.rst to an index file 2020-06-19 12:21:56 -04:00
kcopyd.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
linear.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
log-writes.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
persistent-data.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
snapshot.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
statistics.rst docs: admin-guide: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
striped.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
switch.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
thin-provisioning.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
unstriped.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
verity.rst dm verity: add "panic_on_corruption" error handling mode 2020-07-13 11:47:33 -04:00
writecache.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00
zero.rst docs: device-mapper: move it to the admin-guide 2019-07-15 11:03:01 -03:00