From owner-svn-src-stable-9@FreeBSD.ORG Wed May 16 19:25:51 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24431065670; Wed, 16 May 2012 19:25:51 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C44A8FC12; Wed, 16 May 2012 19:25:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GJPoQB057936; Wed, 16 May 2012 19:25:50 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4GJPoU2057934; Wed, 16 May 2012 19:25:50 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201205161925.q4GJPoU2057934@svn.freebsd.org> From: Christian Brueffer Date: Wed, 16 May 2012 19:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235511 - stable/9/sys/security/mac_mls X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 19:25:51 -0000 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);