cryptsetup: handle more gracefully if "keyslots" LUKS2 JSON header field is invalid
authorLennart Poettering <lennart@poettering.net>
Tue, 28 Sep 2021 10:11:53 +0000 (12:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 28 Sep 2021 14:47:08 +0000 (16:47 +0200)
commit1641c2b1123617f7be249bb7f2b2c408defb3b96
treead86570a38da6ad0c3e821798d657da6e5ca6e68
parent5918a93355bc17a5ec79557c4555201d86b54266
cryptsetup: handle more gracefully if "keyslots" LUKS2 JSON header field is invalid

The field is not owned by us (even though is in our JSON objects) but by
the LUKS2 spec. Hence let's handle this a bit more gracefully: let's not
get confused by it, just warn and skip over it.

Fixes: #20847
src/cryptenroll/cryptenroll-tpm2.c
src/cryptsetup/cryptsetup-fido2.c
src/cryptsetup/cryptsetup-pkcs11.c
src/cryptsetup/cryptsetup-tpm2.c