Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 2010 15:31:01 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208030 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201005131531.o4DFV191073379@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Thu May 13 15:31:00 2010
New Revision: 208030
URL: http://svn.freebsd.org/changeset/base/208030

Log:
  Add missing check to prevent local users from panicing the kernel by trying
  to set malformed ACL.
  
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Thu May 13 15:28:34 2010	(r208029)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Thu May 13 15:31:00 2010	(r208030)
@@ -4939,6 +4939,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005131531.o4DFV191073379>