linux-stable/security
Xiu Jianfeng 7db182a2eb apparmor: Fix memleak in aa_simple_write_to_buffer()
commit 417ea9fe97 upstream.

When copy_from_user failed, the memory is freed by kvfree. however the
management struct and data blob are allocated independently, so only
kvfree(data) cause a memleak issue here. Use aa_put_loaddata(data) to
fix this issue.

Fixes: a6a52579e5 ("apparmor: split load data into management struct and data blob")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-25 11:18:21 +02:00
..
apparmor apparmor: Fix memleak in aa_simple_write_to_buffer() 2022-08-25 11:18:21 +02:00
integrity ima: remove the IMA_TEMPLATE Kconfig option 2022-07-29 17:14:16 +02:00
keys KEYS: fix length validation in keyctl_pkey_params_get_2() 2022-04-15 14:17:58 +02:00
loadpin
lockdown lockdown: also lock down previous kgdb use 2022-06-06 08:33:48 +02:00
safesetid LSM: SafeSetID: Stop releasing uninitialized ruleset 2019-09-17 11:27:05 -07:00
selinux selinux: Add boundary check in put_entry() 2022-08-25 11:17:32 +02:00
smack Fix incorrect type in assignment of ipv6 port for audit 2022-04-15 14:18:22 +02:00
tomoyo TOMOYO: fix __setup handlers return values 2022-04-15 14:18:13 +02:00
yama
commoncap.c security: commoncap: fix -Wstringop-overread warning 2021-05-11 14:04:16 +02:00
device_cgroup.c device_cgroup: Fix RCU list debugging warning 2020-10-01 13:18:13 +02:00
inode.c
Kconfig fortify: Explicitly disable Clang support 2021-11-21 13:38:50 +01:00
Kconfig.hardening
lsm_audit.c dump_common_audit_data(): fix racy accesses to ->d_name 2021-01-19 18:26:16 +01:00
Makefile
min_addr.c
security.c LSM: general protection fault in legacy_parse_param 2022-04-15 14:18:21 +02:00