]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: ensure we cleanup the internal AVC counters on error in avc_insert()
authorPaul Moore <paul@paul-moore.com>
Tue, 10 Dec 2019 01:39:46 +0000 (20:39 -0500)
committerPaul Moore <paul@paul-moore.com>
Tue, 10 Dec 2019 19:16:53 +0000 (14:16 -0500)
commit03af9b5662096742185d241ad360d9322fab14ce
treec35db44612802989e1e84f6ff69c414d6bc858e1
parent7186299d610b8ed894899e0a55054802d413031d
selinux: ensure we cleanup the internal AVC counters on error in avc_insert()

Fix avc_insert() to call avc_node_kill() if we've already allocated
an AVC node and the code fails to insert the node in the cache.

Fixes: a0da6178c70a ("selinux: extended permissions for ioctls")
Reported-by: rsiddoji@codeaurora.org
Suggested-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/avc.c