linux/security/keys
David Gstir 04de7589e0 KEYS: trusted: dcp: fix NULL dereference in AEAD crypto operation
When sealing or unsealing a key blob we currently do not wait for
the AEAD cipher operation to finish and simply return after submitting
the request. If there is some load on the system we can exit before
the cipher operation is done and the buffer we read from/write to
is already removed from the stack. This will e.g. result in NULL
pointer dereference errors in the DCP driver during blob creation.

Fix this by waiting for the AEAD cipher operation to finish before
resuming the seal and unseal calls.

Cc: stable@vger.kernel.org # v6.10+
Fixes: 0e28bf61a5 ("KEYS: trusted: dcp: fix leak of blob encryption key")
Reported-by: Parthiban N <parthiban@linumiz.com>
Closes: https://lore.kernel.org/keyrings/254d3bb1-6dbc-48b4-9c08-77df04baee2f@linumiz.com/
Signed-off-by: David Gstir <david@sigma-star.at>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2024-11-04 21:24:24 +02:00
..
encrypted-keys KEYS: encrypted: add missing MODULE_DESCRIPTION() 2024-07-01 14:16:54 +00:00
trusted-keys KEYS: trusted: dcp: fix NULL dereference in AEAD crypto operation 2024-11-04 21:24:24 +02:00
big_key.c
compat_dh.c
compat.c
dh.c KEYS: DH: Use crypto_wait_req 2023-02-13 18:34:48 +08:00
gc.c keys: update key quotas in key_put() 2024-05-09 16:28:58 +03:00
internal.h keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry 2023-12-21 13:47:38 +00:00
Kconfig
key.c keys: Fix overwrite of key expiration on instantiation 2024-05-09 16:28:58 +03:00
keyctl_pkey.c
keyctl.c task_work: s/task_work_cancel()/task_work_cancel_func()/ 2024-07-09 13:26:31 +02:00
keyring.c security/keys: fix slab-out-of-bounds in key_task_permission 2024-11-04 21:24:24 +02:00
Makefile
permission.c
persistent.c
proc.c keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry 2023-12-21 13:47:38 +00:00
process_keys.c
request_key_auth.c KEYS: Replace all non-returning strlcpy with strscpy 2023-08-17 20:12:35 +00:00
request_key.c keys: Fix linking a duplicate key to a keyring's assoc_array 2023-07-17 19:32:30 +00:00
sysctl.c lsm: remove the now superfluous sentinel element from ctl_table array 2024-04-15 15:00:00 -04:00
user_defined.c