[Midnightbsd-cvs] src [8777] trunk/sys/kern/vfs_acl.c: Prezero the acl strcuture to avoid leaking anything into userland

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 25 23:00:58 EDT 2016


Revision: 8777
          http://svnweb.midnightbsd.org/src/?rev=8777
Author:   laffer1
Date:     2016-09-25 23:00:58 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
Prezero the acl strcuture to avoid leaking anything into userland

Modified Paths:
--------------
    trunk/sys/kern/vfs_acl.c

Modified: trunk/sys/kern/vfs_acl.c
===================================================================
--- trunk/sys/kern/vfs_acl.c	2016-09-26 02:59:39 UTC (rev 8776)
+++ trunk/sys/kern/vfs_acl.c	2016-09-26 03:00:58 UTC (rev 8777)
@@ -247,7 +247,7 @@
 	struct acl *inkernelacl;
 	int error;
 
-	inkernelacl = acl_alloc(M_WAITOK);
+	inkernelacl = acl_alloc(M_WAITOK | M_ZERO);
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 #ifdef MAC
 	error = mac_vnode_check_getacl(td->td_ucred, vp, type);



More information about the Midnightbsd-cvs mailing list