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 apparmor: don't try to replace stale label in ptrace access check 2020-01-27 14:46:04 +01:00
.gitignore Revert "apparmor: add base infastructure for socket mediation" 2017-10-26 19:35:35 +02:00
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 apparmor: move capability checks to using labels 2017-06-10 17:11:40 -07:00
context.c apparmor: switch from profiles to using labels on contexts 2017-06-10 17:11:38 -07:00
crypto.c
domain.c apparmor: Fix aa_label_build() error handling for failed merges 2019-03-13 14:03:16 -07:00
file.c Revert "apparmor: add base infastructure for socket mediation" 2017-10-26 19:35:35 +02:00
ipc.c apparmor: fix logging of the existence test for signals 2018-04-19 08:56:18 +02:00
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 License cleanup: add SPDX license identifiers to some files 2017-11-02 10:04:46 -07:00
match.c doc: ReSTify apparmor.txt 2017-05-18 10:32:38 -06:00
mount.c apparmor: fix reference count leak in aa_pivotroot() 2022-08-25 11:11:32 +02:00
nulldfa.in
path.c apparmor: Move path lookup to using preallocated buffers 2017-06-08 11:29:34 -07:00
policy.c apparmor: fix leak of null profile name if profile allocation fails 2017-12-14 09:53:06 +01:00
policy_ns.c apparmor: ensure unconfined profiles have dfas initialized 2017-09-22 13:00:58 -07:00
policy_unpack.c apparmor: enforce nullbyte at end of tag string 2019-06-25 11:36:51 +08:00
procattr.c apparmor: switch getprocattr to using label_print fns() 2017-06-10 17:11:39 -07:00
resource.c apparmor: move resource checks to using labels 2017-06-10 17:11:40 -07:00
secid.c