Allocate internal buffer in LUKS2 keyring token with crypt_safe_alloc.

With changes in db65a5ceac and subsequent
drop of library memlock_all we should lock keyring key material buffer
in memory system memory as well.
This commit is contained in:
Ondrej Kozina
2022-11-10 16:44:09 +01:00
committed by Milan Broz
parent dab00bfd4f
commit cdfa213ad0
5 changed files with 11 additions and 6 deletions

View File

@@ -37,6 +37,7 @@ static struct crypt_token_handler_internal token_handlers[LUKS2_TOKENS_MAX] = {
.u = {
.v1 = { .name = LUKS2_TOKEN_KEYRING,
.open = keyring_open,
.buffer_free = keyring_buffer_free,
.validate = keyring_validate,
.dump = keyring_dump }
}