linux-stable/security
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
..
apparmor apparmor: fix a memleak in multi_transaction_new() 2023-01-18 09:26:21 +01:00
integrity ima: Fix misuse of dereference of pointer in template_desc_init_fields() 2023-01-18 09:26:13 +01:00
keys KEYS: trusted: Fix migratable=1 failing 2021-03-03 18:22:52 +01:00
loadpin
selinux selinux: Add boundary check in put_entry() 2022-08-25 11:11:14 +02:00
smack Fix incorrect type in assignment of ipv6 port for audit 2022-04-20 09:08:21 +02:00
tomoyo TOMOYO: fix __setup handlers return values 2022-04-20 09:08:17 +02:00
yama Yama: Check for pid death before checking ancestry 2019-01-23 08:09:48 +01:00
commoncap.c capabilities: fix potential memleak on error path from vfs_getxattr_alloc() 2022-11-10 15:47:23 +01:00
device_cgroup.c device_cgroup: fix RCU imbalance in error case 2019-04-27 09:35:40 +02:00
inode.c securityfs: fix use-after-free on symlink traversal 2019-05-25 18:25:34 +02:00
Kconfig
lsm_audit.c dump_common_audit_data(): fix racy accesses to ->d_name 2021-01-23 15:48:43 +01:00
Makefile
min_addr.c
security.c binder: use cred instead of task for selinux checks 2021-11-26 11:40:20 +01:00