mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
MFC r208030:
Add missing check to prevent local users from panicing the kernel by trying to set malformed ACL.
This commit is contained in:
parent
cea772d1e7
commit
44ba1ebbee
1 changed files with 4 additions and 0 deletions
|
|
@ -4936,6 +4936,10 @@ zfs_freebsd_setacl(ap)
|
|||
if (ap->a_aclp->acl_cnt * 2 + 6 > ACL_MAX_ENTRIES)
|
||||
return (ENOSPC);
|
||||
|
||||
error = acl_nfs4_check(ap->a_aclp, ap->a_vp->v_type == VDIR);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
vsecattr.vsa_mask = VSA_ACE;
|
||||
aclbsize = ap->a_aclp->acl_cnt * sizeof(ace_t);
|
||||
vsecattr.vsa_aclentp = kmem_alloc(aclbsize, KM_SLEEP);
|
||||
|
|
|
|||
Loading…
Reference in a new issue