linux-stable/security/apparmor
Gaosheng Cui 11d5fe7da6 apparmor: fix a memleak in multi_transaction_new()
[ Upstream commit c73275cf68 ]

In multi_transaction_new(), the variable t is not freed or passed out
on the failure of copy_from_user(t->data, buf, size), which could lead
to a memleak.

Fix this bug by adding a put_multi_transaction(t) in the error path.

Fixes: 1dea3b41e8 ("apparmor: speed up transactional queries")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 09:26:21 +01:00
..
include
.gitignore
apparmorfs.c apparmor: fix a memleak in multi_transaction_new() 2023-01-18 09:26:21 +01:00
audit.c apparmor: fix quiet_denied for file rules 2022-08-25 11:11:31 +02:00
capability.c
context.c
crypto.c
domain.c
file.c
ipc.c
Kconfig
label.c apparmor: fix aa_label_asxprint return check 2022-08-25 11:11:32 +02:00
lib.c
lsm.c apparmor: don't try to replace stale label in ptraceme check 2020-06-30 15:37:57 -04:00
Makefile
match.c
mount.c apparmor: fix reference count leak in aa_pivotroot() 2022-08-25 11:11:32 +02:00
nulldfa.in
path.c
policy.c
policy_ns.c
policy_unpack.c
procattr.c
resource.c
secid.c