Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2012 19:25:50 +0000 (UTC)
From:      Christian Brueffer <brueffer@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r235511 - stable/9/sys/security/mac_mls
Message-ID:  <201205161925.q4GJPoU2057934@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brueffer
Date: Wed May 16 19:25:50 2012
New Revision: 235511
URL: http://svn.freebsd.org/changeset/base/235511

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

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

Modified: stable/9/sys/security/mac_mls/mac_mls.c
==============================================================================
--- stable/9/sys/security/mac_mls/mac_mls.c	Wed May 16 17:51:56 2012	(r235510)
+++ stable/9/sys/security/mac_mls/mac_mls.c	Wed May 16 19:25:50 2012	(r235511)
@@ -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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205161925.q4GJPoU2057934>