libsepol: do not reject control characters in pathnames
Stephen Smalley
maintainerPATCH 1/1 libsepol: do not reject control characters in pathnames
Pathnames can in fact include control characters and checkpolicy accepts them so we should not reject them in policydb_validate().
Signed-off-by Stephen Smalley <[email protected]>
--- libsepol/src/policydb_validate.c | 6 ------ 1 file changed, 6 deletions(-)
libsepol/src/policydb_validate.c +0 -6
@@ -1478,8 +1478,6 @@ static int validate_filename_trans(hashtab_key_t k, hashtab_datum_t d, goto bad;if (validate_value (ftk->tclass, &flavors[SYM_CLASSES ])) goto bad; -if (validate_string_field (ftk->name)) - goto bad;if (!ftd) goto bad;for (; ftd; ftd = ftd->next) {
@@ -1635,8 +1633,6 @@ static int validate_genfs(sepol_handle_t *handle, const policydb_t *p, validate_value(octx->v.sclass, &flavors[SYM_CLASSES])) goto bad; -if (validate_string_field (octx->u.name)) - goto bad; }if (validate_string_field (genfs->fstype))
@@ -1806,8 +1802,6 @@ validate_filename_trans_rules(sepol_handle_t *handle, goto bad;if (validate_simpletype (filename_trans->otype, p, flavors)) goto bad; -if (validate_string_field (filename_trans->name)) - goto bad;/* currently only the RULE_SELF flag can be set */ switch (filename_trans->flags) {
Signature · 1 line
2.55.0
Stephen Smalley
maintainerQuoted 6 lines · Stephen Smalley
Pathnames can in fact include control characters and checkpolicy accepts them so we should not reject them in
policydb_validate().Signed-off-by Stephen Smalley <[email protected]>
This has been merged.