linux/security/apparmor
Xiu Jianfeng 3265949f7c apparmor: Fix memleak issue in unpack_profile()
Before aa_alloc_profile(), it has allocated string for @*ns_name if @tmpns
is not NULL, so directly return -ENOMEM if aa_alloc_profile() failed will
cause a memleak issue, and even if aa_alloc_profile() succeed, in the
@fail_profile tag of aa_unpack(), it need to free @ns_name as well, this
patch fixes them.

Fixes: 736ec752d9 ("AppArmor: policy routines for loading and unpacking policy")
Fixes: 04dc715e24 ("apparmor: audit policy ns specified in policy load")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-10-25 00:15:19 -07:00
..
include apparmor: refactor code that alloc null profiles 2022-10-24 22:35:36 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
apparmorfs.c apparmor: Fix decompression of rawdata for read back to userspace 2022-10-03 14:49:04 -07:00
audit.c AppArmor: Fix kernel-doc 2022-10-25 00:15:18 -07:00
capability.c apparmor: rework profile->rules to be a list 2022-10-03 14:49:04 -07:00
crypto.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
domain.c apparmor: refactor code that alloc null profiles 2022-10-24 22:35:36 -07:00
file.c apparmor: remove useless static inline functions 2022-10-24 22:35:11 -07:00
ipc.c AppArmor: Fix kernel-doc 2022-10-25 00:15:18 -07:00
Kconfig apparmor: use zstd compression for profile data 2022-10-03 14:49:02 -07:00
label.c apparmor: remove useless static inline functions 2022-10-24 22:35:11 -07:00
lib.c apparmor: rework profile->rules to be a list 2022-10-03 14:49:04 -07:00
lsm.c apparmor: Use pointer to struct aa_label for lbs_cred 2022-10-25 00:15:19 -07:00
Makefile apparmor: isolate policy backwards compatibility to its own file 2022-10-03 14:49:03 -07:00
match.c apparmor: preparse for state being more than just an integer 2022-10-03 14:49:03 -07:00
mount.c apparmor: rework profile->rules to be a list 2022-10-03 14:49:04 -07:00
net.c apparmor: rework profile->rules to be a list 2022-10-03 14:49:04 -07:00
nulldfa.in apparmor: cleanup add proper line wrapping to nulldfa.in 2018-02-09 11:30:01 -08:00
path.c security: apparmor: delete repeated words in comments 2021-02-07 04:15:46 -08:00
policy_compat.c apparmor: Fix doc comment for compute_fperms 2022-10-03 14:49:04 -07:00
policy_ns.c apparmor: refactor code that alloc null profiles 2022-10-24 22:35:36 -07:00
policy_unpack_test.c apparmor: Fix kunit test for out of bounds array 2022-10-03 14:49:04 -07:00
policy_unpack.c apparmor: Fix memleak issue in unpack_profile() 2022-10-25 00:15:19 -07:00
policy.c apparmor: fix a memleak in free_ruleset() 2022-10-25 00:15:19 -07:00
procattr.c apparmor: fix obsoleted comments for aa_getprocattr() and audit_resource() 2022-10-24 22:35:23 -07:00
resource.c apparmor: Fix spelling of function name in comment block 2022-10-25 00:15:19 -07:00
secid.c apparmor: disable showing the mode as part of a secid to secctx 2022-07-13 17:18:29 -07:00
stacksplitdfa.in apparmor: use the dfa to do label parse string splitting 2018-02-09 11:30:01 -08:00
task.c apparmor: Simplify obtain the newest label on a cred 2022-10-03 14:49:04 -07:00