svn commit: r235512 - stable/8/sys/security/mac_mls

Christian Brueffer brueffer at FreeBSD.org
Wed May 16 19:47:03 UTC 2012


Author: brueffer
Date: Wed May 16 19:47:02 2012
New Revision: 235512
URL: http://svn.freebsd.org/changeset/base/235512

Log:
  MFC: r234957
  
  Check vplabel for NULL before dereferencing it.  Fixes a panic
  when running atop with MAC_MLS enabled.

Modified:
  stable/8/sys/security/mac_mls/mac_mls.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/security/mac_mls/mac_mls.c
==============================================================================
--- stable/8/sys/security/mac_mls/mac_mls.c	Wed May 16 19:25:50 2012	(r235511)
+++ stable/8/sys/security/mac_mls/mac_mls.c	Wed May 16 19:47:02 2012	(r235512)
@@ -1837,6 +1837,9 @@ mls_system_check_acct(struct ucred *cred
 	if (!mls_enabled)
 		return (0);
 
+	if (vplabel == NULL)
+		return (0);
+
 	subj = SLOT(cred->cr_label);
 	obj = SLOT(vplabel);
 


More information about the svn-src-stable-8 mailing list