Looks like issue in handling active_nodes count in 4.19 kernel
Ravi Kumar Siddojigari
rsiddoji at codeaurora.org
Fri Dec 20 12:03:01 UTC 2019
Thanks for correcting , Adding the signoff of orginal author in the
following commit .
>From 6308b405e2097ab9d82c5a3894815daf7331e0b6 Mon Sep 17 00:00:00 2001
From: Jaihind Yadav <jaihindyadav at codeaurora.org>
Date: Tue, 17 Dec 2019 17:25:47 +0530
Subject: [PATCH] selinux: ensure we cleanup the internal AVC counters on error
in avc_update()
To: rsiddoji at codeaurora.org
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.
Signed-off-by: Jaihind Yadav <jaihindyadav at codeaurora.org>
Signed-off-by: Ravi Kumar Siddojigari <rsiddoji at codeaurora.org>
---
security/selinux/avc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index ecd3829996aa..9c69e83834b0 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -907,7 +907,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;
}
}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
More information about the Linux-security-module-archive
mailing list