mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
selinux: ensure we cleanup the internal AVC counters on error in avc_update()
[ Upstream commit 030b995ad9ece9fa2d218af4429c1c78c2342096 ]
In AVC update we don't call avc_node_kill() when avc_xperms_populate()
fails, resulting in the avc->avc_cache.active_nodes counter having a
false value. In last patch this changes was missed , so correcting it.
Fixes: fa1aa143ac ("selinux: extended permissions for ioctls")
Signed-off-by: Jaihind Yadav <[email protected]>
Signed-off-by: Ravi Kumar Siddojigari <[email protected]>
[PM: merge fuzz, minor description cleanup]
Signed-off-by: Paul Moore <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
069d2385f3
commit
111749fba9
1 changed files with 1 additions and 1 deletions
|
|
@ -891,7 +891,7 @@ static int avc_update_node(struct selinux_avc *avc,
|
|||
if (orig->ae.xp_node) {
|
||||
rc = avc_xperms_populate(node, orig->ae.xp_node);
|
||||
if (rc) {
|
||||
kmem_cache_free(avc_node_cachep, node);
|
||||
avc_node_kill(avc, node);
|
||||
goto out_unlock;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue