qcrypto-luks: more rigorous header checking
authorMaxim Levitsky <mlevitsk@redhat.com>
Wed, 25 Sep 2019 21:35:26 +0000 (00:35 +0300)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 26 Sep 2019 15:34:02 +0000 (16:34 +0100)
commitbefdba9edd20a896f4082adf6dfb613939a24e0c
tree886acee413d9862cc9773432288d2296836acdcd
parentbd56a55a94148423d37aceb057fa46031065b3da
qcrypto-luks: more rigorous header checking

Check that keyslots don't overlap with the data,
and check that keyslots don't overlap with each other.
(this is done using naive O(n^2) nested loops,
but since there are just 8 keyslots, this doesn't really matter.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
crypto/block-luks.c