diff --git a/libsepol/cil/src/cil_resolve_ast.c b/libsepol/cil/src/cil_resolve_ast.c index 4e8a375d..427a320c 100644 --- a/libsepol/cil/src/cil_resolve_ast.c +++ b/libsepol/cil/src/cil_resolve_ast.c @@ -210,6 +210,12 @@ int cil_resolve_classpermissionset(struct cil_tree_node *current, struct cil_cla goto exit; } + if (!datum->fqn) { + cil_tree_log(current, CIL_ERR, "Anonymous classpermission used in a classpermissionset"); + rc = SEPOL_ERR; + goto exit; + } + rc = cil_resolve_classperms_list(current, cps->classperms, db); if (rc != SEPOL_OK) { goto exit;