android_kernel_xiaomi_sm8350/security
Xiu Jianfeng 7db182a2eb apparmor: Fix memleak in aa_simple_write_to_buffer()
commit 417ea9fe972d2654a268ad66e89c8fcae67017c3 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
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
device_cgroup.c
inode.c
Kconfig fortify: Explicitly disable Clang support 2021-11-21 13:38:50 +01:00
Kconfig.hardening
lsm_audit.c
Makefile
min_addr.c
security.c LSM: general protection fault in legacy_parse_param 2022-04-15 14:18:21 +02:00