android_kernel_xiaomi_sm8350/Documentation/admin-guide/device-mapper
Mikulas Patocka 2d8848edc9 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-30 13:54:10 +01:00
..
cache-policies.rst
cache.rst
delay.rst
dm-clone.rst dm: add clone target 2019-09-12 09:32:31 -04:00
dm-crypt.rst
dm-dust.txt
dm-flakey.rst
dm-init.rst
dm-integrity.rst dm integrity: conditionally disable "recalculate" feature 2021-01-30 13:54:10 +01:00
dm-io.rst
dm-log.rst
dm-queue-length.rst
dm-raid.rst
dm-service-time.rst
dm-uevent.rst
dm-zoned.rst
era.rst
index.rst dm: add dm-clone to the documentation index 2020-01-17 19:48:45 +01:00
kcopyd.rst
linear.rst
log-writes.rst
persistent-data.rst
snapshot.rst
statistics.rst
striped.rst
switch.rst
thin-provisioning.rst
unstriped.rst
verity.rst dm verity: add root hash pkcs#7 signature verification 2019-08-23 10:13:14 -04:00
writecache.rst
zero.rst