svn commit: r234957 - head/sys/security/mac_mls
Christian Brueffer
brueffer at FreeBSD.org
Thu May 3 15:51:34 UTC 2012
Author: brueffer
Date: Thu May 3 15:51:34 2012
New Revision: 234957
URL: http://svn.freebsd.org/changeset/base/234957
Log:
Check vplabel for NULL before dereferencing it. Fixes a panic
when running atop with MAC_MLS enabled.
Submitted by: Richard Kojedzinszky <krichy at tvnetwork.hu>
Reviewed by: rwatson
MFC after: 1 week
Modified:
head/sys/security/mac_mls/mac_mls.c
Modified: head/sys/security/mac_mls/mac_mls.c
==============================================================================
--- head/sys/security/mac_mls/mac_mls.c Thu May 3 15:37:05 2012 (r234956)
+++ head/sys/security/mac_mls/mac_mls.c Thu May 3 15:51:34 2012 (r234957)
@@ -2028,6 +2028,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-all
mailing list