android_kernel_motorola_sm6375/security/keys
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers 07861d6371 KEYS: trusted_tpm1: Compare HMAC values in constant time
[ Upstream commit eed0e3d305530066b4fc5370107cff8ef1a0d229 ]

To prevent timing attacks, HMAC value comparison needs to be constant
time.  Replace the memcmp() with the correct function, crypto_memneq().

[For the Fixes commit I used the commit that introduced the memcmp().
It predates the introduction of crypto_memneq(), but it was still a bug
at the time even though a helper function didn't exist yet.]

Fixes: d00a1c72f7 ("keys: add new trusted key-type")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
[ changed include from crypto/utils.h to crypto/algapi.h ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-29 14:00:01 +01:00
..
encrypted-keys
big_key.c
compat.c
compat_dh.c
dh.c
gc.c
internal.h
Kconfig
key.c
keyctl.c security: keys: perform capable check only on privileged operations 2023-09-23 10:59:39 +02:00
keyctl_pkey.c
keyring.c security/keys: fix slab-out-of-bounds in key_task_permission 2024-11-17 14:58:50 +01:00
Makefile
permission.c
persistent.c
proc.c
process_keys.c
request_key.c
request_key_auth.c
sysctl.c
trusted.c KEYS: trusted_tpm1: Compare HMAC values in constant time 2025-10-29 14:00:01 +01:00
user_defined.c