kernel-fxtec-pro1x/security/selinux
Ondrej Mosnacek 46650ac2e1 selinux: fix memory leak in policydb_init()
commit 45385237f65aeee73641f1ef737d7273905a233f upstream.

Since roles_init() adds some entries to the role hash table, we need to
destroy also its keys/values on error, otherwise we get a memory leak in
the error path.

Cc: <stable@vger.kernel.org>
Reported-by: syzbot+fee3a14d4cdf92646287@syzkaller.appspotmail.com
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-06 19:06:54 +02:00
..
include selinux: avoid silent denials in permissive mode under RCU walk 2019-05-08 07:21:54 +02:00
ss selinux: fix memory leak in policydb_init() 2019-08-06 19:06:54 +02:00
.gitignore
avc.c selinux: avoid silent denials in permissive mode under RCU walk 2019-05-08 07:21:54 +02:00
exports.c
hooks.c selinux: fix empty write to keycreate file 2019-07-26 09:14:07 +02:00
ibpkey.c
Kconfig
Makefile
netif.c
netlabel.c selinux: avoid uninitialized variable warning 2019-05-31 06:46:31 -07:00
netlink.c
netnode.c
netport.c
nlmsgtab.c
selinuxfs.c
xfrm.c