libsepol: validate empty common classes in scope indices
Validate no common classes inside scope indices are defined. Reported-by: oss-fuzz (issue 64849) Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
d0b1400afb
commit
e54bedce80
|
@ -1344,6 +1344,8 @@ bad:
|
|||
|
||||
static int validate_scope_index(sepol_handle_t *handle, const scope_index_t *scope_index, validate_t flavors[])
|
||||
{
|
||||
if (!ebitmap_is_empty(&scope_index->scope[SYM_COMMONS]))
|
||||
goto bad;
|
||||
if (validate_ebitmap(&scope_index->p_classes_scope, &flavors[SYM_CLASSES]))
|
||||
goto bad;
|
||||
if (validate_ebitmap(&scope_index->p_roles_scope, &flavors[SYM_ROLES]))
|
||||
|
|
Loading…
Reference in New Issue