linux-stable/security/keys
Silvio Gissi ad2011ea78 keys: Fix overwrite of key expiration on instantiation
commit 9da27fb65a 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: 39299bdd25 ("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-05-17 11:48:11 +02:00
..
encrypted-keys
trusted-keys security: keys: Modify mismatched function name 2023-07-27 08:44:39 +02:00
Kconfig
Makefile
big_key.c
compat.c
compat_dh.c
dh.c
gc.c keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry 2024-01-05 15:12:25 +01:00
internal.h keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry 2024-01-05 15:12:25 +01:00
key.c keys: Fix overwrite of key expiration on instantiation 2024-05-17 11:48:11 +02:00
keyctl.c security: keys: perform capable check only on privileged operations 2023-09-19 12:20:05 +02:00
keyctl_pkey.c
keyring.c
permission.c
persistent.c
proc.c keys, dns: Allow key types (eg. DNS) to be reclaimed immediately on expiry 2024-01-05 15:12:25 +01:00
process_keys.c
request_key.c keys: Fix linking a duplicate key to a keyring's assoc_array 2023-07-27 08:44:34 +02:00
request_key_auth.c
sysctl.c
user_defined.c