]> git.ipfire.org Git - thirdparty/systemd.git/commit
libfido2-util: accept cached pin in fido2_generate_hmac_hash()
authorMartin Wilck <mwilck@suse.com>
Mon, 17 Feb 2025 17:40:35 +0000 (18:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 27 Feb 2025 16:35:47 +0000 (17:35 +0100)
commit505c2f21377019c058de16aa9e2d8db005e97e6f
tree78d4fb55c83af8dcdaab725a80f0ff8996efe836
parent250118f3f07165266af6585e608d7995189941c5
libfido2-util: accept cached pin in fido2_generate_hmac_hash()

fido2_generate_hmac_hash() sets req->keyring to "fido2-pin" when
calling ask_password_auto(), suggesting that a key by this name
can be read from the kernel keyring. But the keyring is never
opened because the ASK_PASSWORD_ACCEPT_CACHED flag is not set.

Set ASK_PASSWORD_ACCEPT_CACHED to allow automated / scripted
setup of encrypted volumes with FIDO2. If the PIN turns out to
be invalid, clear ASK_PASSWORD_ACCEPT_CACHED to avoid retrying
and possible lockout.
src/shared/libfido2-util.c