Ondrej Mosnacek
authored
The conversion to kvmalloc() forgot to account for the possibility that p->type_attr_map_array might be null in policydb_destroy(). Fix this by destroying its contents only if it is not NULL. Also make sure ebitmap_init() is called on all entries before policydb_destroy() can be called. Right now this is a no-op, because both kvcalloc() and ebitmap_init() just zero out the whole struct, but let's rather not rely on a specific implementation. Reported-by:<syzbot+a57b2aff60832666fc28@syzkaller.appspotmail.com> Fixes: acdf52d9 ("selinux: convert to kvmalloc") Signed-off-by:
Ondrej Mosnacek <omosnace@redhat.com> Acked-by:
Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by:
Paul Moore <paul@paul-moore.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name | Last commit | Last update |
---|---|---|
.. | ||
include | ||
ss | ||
.gitignore | ||
Kconfig | ||
Makefile | ||
avc.c | ||
hooks.c | ||
ibpkey.c | ||
netif.c | ||
netlabel.c | ||
netlink.c | ||
netnode.c | ||
netport.c | ||
nlmsgtab.c | ||
selinuxfs.c | ||
xfrm.c |