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);
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to