mint0x33/security/apparmor
Gaosheng Cui 11d5fe7da6 apparmor: fix a memleak in multi_transaction_new()
[ Upstream commit c73275cf6834787ca090317f1d20dbfa3b7f05aa ]

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 apparmor: don't try to replace stale label in ptrace access check 2020-01-27 14:46:04 +01:00
.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 apparmor: Fix aa_label_build() error handling for failed merges 2019-03-13 14:03:16 -07:00
file.c
ipc.c
Kconfig
label.c apparmor: fix aa_label_asxprint return check 2022-08-25 11:11:32 +02:00
lib.c apparmor: Fix uninitialized value in aa_split_fqname 2018-11-27 16:10:47 +01:00
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 apparmor: enforce nullbyte at end of tag string 2019-06-25 11:36:51 +08:00
procattr.c
resource.c
secid.c