dm crypt: rewrite (wipe) key in crypto layer using random data
authorOndrej Kozina <okozina@redhat.com>
Mon, 24 Apr 2017 12:21:53 +0000 (14:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:30:58 +0000 (14:30 +0200)
commit4c1dad842bfc7e4140774bd58c70b2612930eebd
treeedfead940588344100e0e462fc0048f7ccd2a486
parentbce0767157c3b540a3fad82c3f1ea4be480bb03e
dm crypt: rewrite (wipe) key in crypto layer using random data

commit c82feeec9a014b72c4ffea36648cfb6f81cc1b73 upstream.

The message "key wipe" used to wipe real key stored in crypto layer by
rewriting it with zeroes.  Since commit 28856a9 ("crypto: xts -
consolidate sanity check for keys") this no longer works in FIPS mode
for XTS.

While running in FIPS mode the crypto key part has to differ from the
tweak key.

Fixes: 28856a9 ("crypto: xts - consolidate sanity check for keys")
Signed-off-by: Ondrej Kozina <okozina@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-crypt.c