linux-stable/security
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
..
apparmor lsm: make security_socket_getpeersec_stream() sockptr_t safe 2024-03-15 10:48:20 -04:00
bpf
integrity ima: annotate iint mutex to avoid lockdep false positive warnings 2023-12-08 08:46:15 +01:00
keys keys: Fix overwrite of key expiration on instantiation 2024-05-17 11:48:11 +02:00
loadpin LoadPin: Ignore the "contents" argument of the LSM hooks 2023-01-14 10:16:22 +01:00
lockdown
safesetid LSM: SafeSetID: Fix warnings reported by test bot 2020-10-13 09:17:36 -07:00
selinux lsm: make security_socket_getpeersec_stream() sockptr_t safe 2024-03-15 10:48:20 -04:00
smack smack: Handle SMACK64TRANSMUTE in smack_inode_setsecurity() 2024-04-13 12:58:00 +02:00
tomoyo tomoyo: fix UAF write bug in tomoyo_write_control() 2024-03-06 14:37:49 +00:00
yama task_work: cleanup notification modes 2020-10-17 15:05:30 -06:00
Kconfig x86/retbleed: Add fine grained Kconfig knobs 2022-07-25 11:26:50 +02:00
Kconfig.hardening hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zero 2022-10-26 13:25:12 +02:00
Makefile
commoncap.c capabilities: fix potential memleak on error path from vfs_getxattr_alloc() 2022-11-10 18:14:26 +01:00
device_cgroup.c device_cgroup: Roll back to original exceptions after copy failure 2023-01-14 10:16:36 +01:00
inode.c
lsm_audit.c dump_common_audit_data(): fix racy accesses to ->d_name 2021-01-19 18:27:29 +01:00
min_addr.c
security.c lsm: fix default return value of the socket_getpeersec_*() hooks 2024-03-15 10:48:20 -04:00