svn commit: r246758 - stable/8/sys/kern

Sergey Kandaurov pluknet at FreeBSD.org
Wed Feb 13 10:18:27 UTC 2013


Author: pluknet
Date: Wed Feb 13 10:18:26 2013
New Revision: 246758
URL: http://svnweb.freebsd.org/changeset/base/246758

Log:
  MFC r246412:
    Prezero the acl structure which is to be copied to usermode, to avoid
    leakage of the previous content of padding and unitialized fields.

Modified:
  stable/8/sys/kern/vfs_acl.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/kern/   (props changed)

Modified: stable/8/sys/kern/vfs_acl.c
==============================================================================
--- stable/8/sys/kern/vfs_acl.c	Wed Feb 13 10:16:58 2013	(r246757)
+++ stable/8/sys/kern/vfs_acl.c	Wed Feb 13 10:18:26 2013	(r246758)
@@ -246,7 +246,7 @@ vacl_get_acl(struct thread *td, struct v
 	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 svn-src-all mailing list