[PATCH 6.18.y 1/7] Revert "selinux: reject a permission value exceeding the class permission count"
Wentao Guan <[email protected]>
| Newsgroups | org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
This reverts commit 62be2361da29505d3183da854f1c98d2e208e852. This pick was applied without its upstream prerequisites (commit fa79a596848f "selinux: use u16 for security classes" and commit 18fa21f10d00 "selinux: more strict policy parsing") and is therefore incomplete. Drop it here; it is re-applied later in this series in the correct upstream order. Signed-off-by: Wentao Guan <[email protected]> --- security/selinux/ss/policydb.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index fdb8a62da04ad..69c19ef4b8817 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -1168,9 +1168,6 @@ static int perm_read(struct policydb *p, struct symtab *s, struct policy_file *f rc = symtab_insert(s, key, perdatum); if (rc) goto bad; - /* indexes an nprim-sized array in security_get_permissions() */ - if (perdatum->value > s->nprim) - goto bad; return 0; bad: -- 2.30.2