WSL2-Linux-Kernel/security/apparmor
Xiu Jianfeng bf7ebebce2 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:40:01 +02:00
..
include apparmor: fix overlapping attachment computation 2022-08-25 11:40:00 +02:00
.gitignore
Kconfig
Makefile
apparmorfs.c apparmor: Fix memleak in aa_simple_write_to_buffer() 2022-08-25 11:40:01 +02:00
audit.c apparmor: fix quiet_denied for file rules 2022-08-25 11:39:59 +02:00
capability.c
crypto.c
domain.c apparmor: fix overlapping attachment computation 2022-08-25 11:40:00 +02:00
file.c
ipc.c
label.c apparmor: fix aa_label_asxprint return check 2022-08-25 11:40:00 +02:00
lib.c
lsm.c
match.c
mount.c apparmor: fix reference count leak in aa_pivotroot() 2022-08-25 11:40:01 +02:00
net.c
nulldfa.in
path.c
policy.c
policy_ns.c
policy_unpack.c apparmor: fix setting unconfined mode on a loaded profile 2022-08-25 11:40:00 +02:00
policy_unpack_test.c
procattr.c
resource.c
secid.c
stacksplitdfa.in
task.c