linux/security
Jarkko Sakkinen af0689cafb KEYS: trusted: Fix a memory leak in tpm2_load_cmd
commit 62cd5d480b upstream.

'tpm2_load_cmd' allocates a tempoary blob indirectly via 'tpm2_key_decode'
but it is not freed in the failure paths. Address this by wrapping the blob
into with a cleanup helper.

Cc: stable@vger.kernel.org # v5.13+
Fixes: f221974525 ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-11 15:18:50 +01:00
..
apparmor apparmor: use the condition in AA_BUG_FMT even with debug disabled 2025-08-28 16:26:01 +02:00
bpf bpf: lsm: Set bpf_lsm_blob_sizes.lbs_task to 0 2024-10-17 15:21:27 +02:00
integrity ima: Handle error code returned by ima_filter_rule_match() 2026-01-11 15:18:28 +01:00
keys KEYS: trusted: Fix a memory leak in tpm2_load_cmd 2026-01-11 15:18:50 +01:00
landlock landlock: Add the errata interface 2025-04-25 10:44:02 +02:00
loadpin LoadPin: Ignore the "contents" argument of the LSM hooks 2022-12-31 13:33:07 +01:00
lockdown lockdown: ratelimit denial messages 2022-09-14 07:37:50 -04:00
safesetid safesetid: check size of policy writes 2025-02-21 13:49:31 +01:00
selinux selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len 2025-06-27 11:07:37 +01:00
smack smack: fix bug: unprivileged task can create labels 2026-01-11 15:18:17 +01:00
tomoyo tomoyo: don't emit warning in tomoyo_write_control() 2025-02-21 13:49:31 +01:00
yama task_work: cleanup notification modes 2020-10-17 15:05:30 -06:00
commoncap.c capabilities: fix potential memleak on error path from vfs_getxattr_alloc() 2022-10-28 06:44:33 -04:00
device_cgroup.c device_cgroup: Roll back to original exceptions after copy failure 2023-01-07 11:11:56 +01:00
inode.c securityfs: don't pin dentries twice, once is enough... 2025-08-28 16:25:52 +02:00
Kconfig proc: add config & param to block forcing mem writes 2024-10-17 15:21:39 +02:00
Kconfig.hardening randstruct: disable Clang 15 support 2023-02-25 11:25:43 +01:00
lsm_audit.c lsm: clean up redundant NULL pointer check 2022-08-15 22:44:01 -04:00
Makefile security: remove unneeded subdir-$(CONFIG_...) 2021-09-03 08:17:20 +09:00
min_addr.c sysctl: pass kernel pointers to ->proc_handler 2020-04-27 02:07:40 -04:00
security.c ima: Avoid blocking in RCU read-side critical section 2024-07-11 12:47:16 +02:00