mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 04:40:05 +01:00
Do not allow unexpected fields in keyring token validation.
This commit is contained in:
committed by
Milan Broz
parent
2b6808f165
commit
1968efe9f0
@@ -62,6 +62,11 @@ static int keyring_validate(struct crypt_device *cd __attribute__((unused)),
|
||||
return r;
|
||||
}
|
||||
|
||||
if (json_object_object_length(jobj_token) != 3) {
|
||||
log_dbg("Keyring token is expected to have exactly 3 fields.");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!json_object_object_get_ex(jobj_token, "key_description", &jobj_key)) {
|
||||
log_dbg("missing key_description field.");
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user