linux-stable/security
Xiu Jianfeng 6500eb3a48 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:15:36 +02:00
..
apparmor apparmor: Fix memleak in aa_simple_write_to_buffer() 2022-08-25 11:15:36 +02:00
integrity ima: remove the IMA_TEMPLATE Kconfig option 2022-07-29 17:10:36 +02:00
keys KEYS: trusted: Fix migratable=1 failing 2021-03-04 09:39:53 +01:00
loadpin
selinux selinux: Add boundary check in put_entry() 2022-08-25 11:15:00 +02:00
smack Fix incorrect type in assignment of ipv6 port for audit 2022-04-15 14:14:54 +02:00
tomoyo TOMOYO: fix __setup handlers return values 2022-04-15 14:14:48 +02:00
yama
commoncap.c security: commoncap: fix -Wstringop-overread warning 2021-05-22 10:59:21 +02:00
device_cgroup.c
inode.c
Kconfig fortify: Explicitly disable Clang support 2021-11-26 11:36:18 +01:00
lsm_audit.c dump_common_audit_data(): fix racy accesses to ->d_name 2021-01-19 18:22:37 +01:00
Makefile
min_addr.c
security.c binder: use cred instead of task for selinux checks 2021-11-26 11:35:56 +01:00