Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u4KJ6385026080 for ; Fri, 20 May 2016 15:06:03 -0400 Received: from apxexsophos01.apex.local (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id A214F257A79_73F5FFBB for ; Fri, 20 May 2016 19:05:31 +0000 (GMT) Received: from APXEXCASHT01.APEX.LOCAL (apxexcasht01 [10.1.60.50]) by apxexsophos01.apex.local (Sophos Email Appliance) with ESMTP id 88A4E254C92_73F5FFBF for ; Fri, 20 May 2016 19:05:31 +0000 (GMT) From: "Jesse M. Bacon" To: "selinux@tycho.nsa.gov" Subject: Fw: libsepol will not compile Date: Fri, 20 May 2016 19:05:29 +0000 Message-ID: <1463771129308.79509@ce.apexsystemsinc.com> References: <1463767911810.39859@ce.apexsystemsinc.com> In-Reply-To: <1463767911810.39859@ce.apexsystemsinc.com> Content-Type: multipart/alternative; boundary="_000_146377112930879509ceapexsystemsinccom_" MIME-Version: 1.0 List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: --_000_146377112930879509ceapexsystemsinccom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ? Tycho, I am having an issue with SELinux. We have servers currently deployed with= Red Hat Enterprise Linux on them and they required enhanced access control= s. I have already recommended that we use SELinux to increase the security= of our access controls for users and files. I am attempting to work throu= gh a book on SELinux in order to make recommendations about how it can be l= everaged on these systems. The book exercises lead me to an example where = I am running "chcat -l -- +Salaries myuser". RHEL 6.7 is unable to create the security context. I am in mls mode. I g= rabbed a source version of the most recent build of SELinux so that I could= build libsepol and semanage from source and see if that made a difference.= I found that RedHat had a bug report where semanage is faulty within thei= r distribution and that a patch had been issued and everything but it looks= like the patch is for Fedora. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=3D1048524 The latest version of SELinux requires a compiler in excess of what ships w= ith RHEL 6.7. I upgraded to the 6.1 version of gcc and installed all the d= ependencies and crossed my fingers and ran make. Unfortunately libsepol ca= nnot compile because: """ util.c:127: error: 'low_bit' may be used uninitialized in this function """ I can't get any of it to compile even when I set the LIBDIR to lib64 and ru= n make with --disable-multilib. Forgive me, I'm a beginner, I've never written a driver or kernel module, a= nd I don't know what that means. The RedHat guide for SELinux provides a g= ist for MLS. I can work through that and will. I am concerned that there = will be no way to get this running given the OS and the documentation and a= clean source build. In order to get e more current version of SELinux and gcc I will have to go= to RHEL7. RHEL7 features grub2 and I still have to figure out how to audi= t that at boot time and additionally there is a use after free vulnerabilit= y that has me worried about access control credentials getting snooped. I = can't let that happen and RedHat says the vulnerability does not affect RHE= L 6.7. That I believe, is a separate issue. There are a lot of appliances affected by this, I will need help writing co= nfiguration scripts to get them all into MLS mode and enforcing. Please forgive me if this isn't proper forum for this. My system is unable to create the MLS context when I run the chcat -l comma= nd using the RedHat supplied packages """ libsepol.mls_from_string: invalid MLS context s0-s0:Salaries (No such file= or directory) """ The contents of my /etc/selinux/mls/setrans.conf is as follows: # Uncomment the following to disable translation libary # disable=3D1 # # Objects can be labeled with one of 16 levels and be categorized with 0-10= 23 # categories defined by the admin. # Objects can be in more than one category at a time. # Users can modify this table to translate the MLS labels for different pur= pose. # # Assumptions: using below MLS labels. # SystemLow # SystemHigh # Unclassified # Secret with compartments A and B. # # SystemLow and SystemHigh s0=3DSystemLow s15:c0.c1023=3DSystemHigh s0-s15:c0.c1023=3DSystemLow-SystemHigh s0:c102=3DContracts s0:c103=3DSalaries s0-s0:c1.c127=3DFinanceData # Unclassified level s1=3DUnclassified # Secret level with compartments s2=3DSecret s2:c0=3DA s2:c1=3DB # ranges for Unclassified s0-s1=3DSystemLow-Unclassified s1-s2=3DUnclassified-Secret s1-s15:c0.c1023=3DUnclassified-SystemHigh # ranges for Secret with compartments s0-s2=3DSystemLow-Secret s0-s2:c0=3DSystemLow-Secret:A s0-s2:c1=3DSystemLow-Secret:B s0-s2:c0,c1=3DSystemLow-Secret:AB s1-s2:c0=3DUnclassified-Secret:A s1-s2:c1=3DUnclassified-Secret:B s1-s2:c0,c1=3DUnclassified-Secret:AB s2-s2:c0=3DSecret-Secret:A s2-s2:c1=3DSecret-Secret:B s2-s2:c0,c1=3DSecret-Secret:AB s2-s15:c0.c1023=3DSecret-SystemHigh s2:c0-s2:c0,c1=3DSecret:A-Secret:AB s2:c0-s15:c0.c1023=3DSecret:A-SystemHigh s2:c1-s2:c0,c1=3DSecret:B-Secret:AB s2:c1-s15:c0.c1023=3DSecret:B-SystemHigh s2:c0,c1-s15:c0.c1023=3DSecret:AB-SystemHigh ?sincerely, Jesse Bacon This e-mail communication (including any attachments) may contain confident= ial information intended solely for the use of the intended recipient. If y= ou are not the intended recipient, you should immediately stop reading this= message and delete it from your system. Any unauthorized reading, distribu= tion, copying or other use of this communication (or its attachments) is st= rictly prohibited. This e-mail communication (including any attachments) may contain confident= ial information intended solely for the use of the intended recipient. If y= ou are not the intended recipient, you should immediately stop reading this= message and delete it from your system. Any unauthorized reading, distribu= tion, copying or other use of this communication (or its attachments) is st= rictly prohibited. --_000_146377112930879509ceapexsystemsinccom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

​

Tycho,


I am having an issue with SELinux.  We have servers currently deplo= yed with Red Hat Enterprise Linux on them and they required enhanced access= controls.  I have already recommended that we use SELinux to increase= the security of our access controls for users and files.  I am attempting to work through a book on SELinux in orde= r to make recommendations about how it can be leveraged on these systems. &= nbsp;The book exercises lead me to an example where I am running "chca= t -l -- +Salaries myuser".


RHEL 6.7 is unable to create the security context.  I am in ml= s mode.   I grabbed a source version of the most recent build of = SELinux so that I could build libsepol and semanage from source and see if = that made a difference.  I found that RedHat had a bug report where semanage is faulty within their distribution and that a patch= had been issued and everything but it looks like the patch is for Fedora.<= /p>

 

Reference:

https:= //bugzilla.redhat.com/show_bug.cgi?id=3D1048524


The latest version of SELinux requires a compiler in excess of what ship= s with RHEL 6.7.  I upgraded to the 6.1 version of gcc and instal= led all the dependencies and crossed my fingers and ran make.  Unfortu= nately libsepol cannot compile because:

"""

util.c:127: error: 'low_bit' may be used uninitialized in this function<= br>

"""

I can't get any of it to compile even when I set the LIBDIR to lib64 and= run make with --disable-multilib.


Forgive me, I'm a beginner, I've never written a driver or kernel module, = and I don't know what that means.  The RedHat guide for SELinux provid= es a gist for MLS.  I can work through that and will.  I am concerned that there will be no way to get this = running given the OS and the documentation and a clean source build.  =


In order to get e more current version of SELinux and gcc I will have to g= o to RHEL7.  RHEL7 features grub2 and I still have to figure out how t= o audit that at boot time and additionally there is a use after free vulnerability that has me worried about access c= ontrol credentials getting snooped.  I can't let that happen and RedHa= t says the vulnerability does not affect RHEL 6.7.  That I believe, is= a separate issue. 


There are a lot of appliances affected by this, I will need help writing c= onfiguration scripts to get them all into MLS mode and enforcing.


Please forgive me if this isn't proper forum for this.      = ;


My system is unable to create the MLS context when I run the chcat -l = ;command using the RedHat supplied packages

"""

libsepol.mls_from_string:  invalid MLS context s0-s0:Salaries (No suc= h file or directory)

"""


The contents of my /etc/selinux/mls/setrans.conf is as follows:


# Uncomment the following to disable translation libary
# disable=3D1
#
# Objects can be labeled with one of 16 levels and be categorized with= 0-1023
# categories defined by the admin.
# Objects can be in more than one category at a time.
# Users can modify this table to translate the MLS labels for differen= t purpose.
#
# Assumptions: using below MLS labels.
#  SystemLow
#  SystemHigh
#  Unclassified
#  Secret with compartments A and B.
#
# SystemLow and SystemHigh
s0=3DSystemLow
s15:c0.c1023=3DSystemHigh
s0-s15:c0.c1023=3DSystemLow-SystemHigh
s0:c102=3DContracts
s0:c103=3DSalaries
s0-s0:c1.c127=3DFinanceData
# Unclassified level
s1=3DUnclassified

# Secret level with compartments
s2=3DSecret
s2:c0=3DA
s2:c1=3DB

# ranges for Unclassified
s0-s1=3DSystemLow-Unclassified
s1-s2=3DUnclassified-Secret
s1-s15:c0.c1023=3DUnclassified-SystemHigh

# ranges for Secret with compartments
s0-s2=3DSystemLow-Secret
s0-s2:c0=3DSystemLow-Secret:A
s0-s2:c1=3DSystemLow-Secret:B
s0-s2:c0,c1=3DSystemLow-Secret:AB
s1-s2:c0=3DUnclassified-Secret:A
s1-s2:c1=3DUnclassified-Secret:B
s1-s2:c0,c1=3DUnclassified-Secret:AB
s2-s2:c0=3DSecret-Secret:A
s2-s2:c1=3DSecret-Secret:B
s2-s2:c0,c1=3DSecret-Secret:AB
s2-s15:c0.c1023=3DSecret-SystemHigh
s2:c0-s2:c0,c1=3DSecret:A-Secret:AB
s2:c0-s15:c0.c1023=3DSecret:A-SystemHigh
s2:c1-s2:c0,c1=3DSecret:B-Secret:AB
s2:c1-s15:c0.c1023=3DSecret:B-SystemHigh
s2:c0,c1-s15:c0.c1023=3DSecret:AB-SystemHigh

​sincerely,

Jesse Bacon


This e-mail communication (including any att= achments) may contain confidential information intended solely for the use = of the intended recipient. If you are not the intended recipient, you should immediately stop reading this message and delete it = from your system. Any unauthorized reading, distribution, copying or other = use of this communication (or its attachments) is strictly prohibited.
This e-mail communication (including any attachments) may co= ntain confidential information intended solely for the use of the intended = recipient. If you are not the intended recipient, you should immediately stop reading this message and delete it = from your system. Any unauthorized reading, distribution, copying or other = use of this communication (or its attachments) is strictly prohibited.
--_000_146377112930879509ceapexsystemsinccom_--