Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Mar 2017 23:23:28 +0000 (UTC)
From:      Martin Matuska <mm@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314572 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201703022323.v22NNSCp042409@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mm
Date: Thu Mar  2 23:23:28 2017
New Revision: 314572
URL: https://svnweb.freebsd.org/changeset/base/314572

Log:
  Fix null pointer dereference in zfs_freebsd_setacl().
  
  Prevents unprivileged users from panicking the kernel by calling
  __acl_delete_*() on files or directories inside a ZFS mount.
  
  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 Mar  2 22:59:35 2017	(r314571)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Thu Mar  2 23:23:28 2017	(r314572)
@@ -5871,6 +5871,9 @@ zfs_freebsd_setacl(ap)
 	if (ap->a_type != ACL_TYPE_NFS4)
 		return (EINVAL);
 
+	if (ap->a_aclp == NULL)
+		return (EINVAL);
+
 	if (ap->a_aclp->acl_cnt < 1 || ap->a_aclp->acl_cnt > MAX_ACL_ENTRIES)
 		return (EINVAL);
 



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