linux-stable/security
Huaxin Lu bfe1e039a0 ima: Fix a potential NULL pointer access in ima_restore_measurement_list
commit 11220db412 upstream.

In restore_template_fmt, when kstrdup fails, a non-NULL value will still be
returned, which causes a NULL pointer access in template_desc_init_fields.

Fixes: c7d0936770 ("ima: support restoring multiple template formats")
Cc: stable@kernel.org
Co-developed-by: Jiaming Li <lijiaming30@huawei.com>
Signed-off-by: Jiaming Li <lijiaming30@huawei.com>
Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-14 10:16:35 +01:00
..
apparmor apparmor: Fix memleak in alloc_ns() 2023-01-14 10:15:48 +01:00
bpf
integrity ima: Fix a potential NULL pointer access in ima_restore_measurement_list 2023-01-14 10:16:35 +01:00
keys KEYS: fix length validation in keyctl_pkey_params_get_2() 2022-04-08 14:39:50 +02:00
loadpin LoadPin: Ignore the "contents" argument of the LSM hooks 2023-01-14 10:16:22 +01:00
lockdown
safesetid
selinux selinux: enable use of both GFP_KERNEL and GFP_ATOMIC in convert_context() 2022-10-30 09:41:15 +01:00
smack Fix incorrect type in assignment of ipv6 port for audit 2022-04-08 14:40:31 +02:00
tomoyo TOMOYO: fix __setup handlers return values 2022-04-08 14:40:18 +02:00
yama
commoncap.c capabilities: fix potential memleak on error path from vfs_getxattr_alloc() 2022-11-10 18:14:26 +01:00
device_cgroup.c
inode.c
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
lsm_audit.c
Makefile
min_addr.c
security.c lsm,selinux: pass flowi_common instead of flowi to the LSM hooks 2022-06-09 10:21:09 +02:00