kernel_samsung_a53x/security/keys
Silvio Gissi e457812cb1 keys: Fix overwrite of key expiration on instantiation
commit 9da27fb65a14c18efd4473e2e82b76b53ba60252 upstream.

The expiry time of a key is unconditionally overwritten during
instantiation, defaulting to turn it permanent. This causes a problem
for DNS resolution as the expiration set by user-space is overwritten to
TIME64_MAX, disabling further DNS updates. Fix this by restoring the
condition that key_set_expiry is only called when the pre-parser sets a
specific expiry.

Fixes: 39299bdd2546 ("keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry")
Signed-off-by: Silvio Gissi <sifonsec@amazon.com>
cc: David Howells <dhowells@redhat.com>
cc: Hazem Mohamed Abuelfotoh <abuehaze@amazon.com>
cc: linux-afs@lists.infradead.org
cc: linux-cifs@vger.kernel.org
cc: keyrings@vger.kernel.org
cc: netdev@vger.kernel.org
cc: stable@vger.kernel.org
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 11:32:49 +01:00
..
encrypted-keys Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trusted-keys Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
big_key.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
compat_dh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gc.c keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry 2024-11-18 12:11:59 +01:00
internal.h keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry 2024-11-18 12:11:59 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
key.c keys: Fix overwrite of key expiration on instantiation 2024-11-19 11:32:49 +01:00
keyctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyctl_pkey.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyring.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
permission.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
persistent.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.c keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry 2024-11-18 12:11:59 +01:00
process_keys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
request_key.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
request_key_auth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
user_defined.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00