1.\" Copyright (c) 2002 Networks Associates Technology, Inc. 2.\" All rights reserved. 3.\" 4.\" This software was developed for the FreeBSD Project by Chris Costello 5.\" at Safeport Network Services and Network Associates Laboratories, the 6.\" Security Research Division of Network Associates, Inc. under 7.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the 8.\" DARPA CHATS research program. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" $FreeBSD$ 32.Dd DECEMBER 1, 2002 33.Os 34.Dt MAC_MLS 4 35.Sh NAME 36.Nm mac_mls 37.Nd Multi-Level Security confidentiality policy 38.Sh SYNOPSIS 39To compile MLS into your kernel, place the following lines in your kernel 40configuration file: 41.Cd "options MAC" 42.Cd "options MAC_MLS" 43.Pp 44Alternately, to load the MLS module at boot time, place the following line 45in your kernel configuration file: 46.Cd "options MAC" 47.Pp 48and in 49.Xr loader.conf 5 : 50.Cd mac_mls_load= Ns \&"YES" 51.Sh DESCRIPTION 52The 53.Nm 54policy module implements the Multi-Level Security, or MLS model, 55which controls access between subjects and objects based on their 56confidentiality by means of a strict information flow policy. 57Each subject and object in the system has an MLS label associated with it; 58each subject's MLS label contains information on its clearance level, 59and each object's MLS label contains information on its classification. 60.Pp 61In MLS, all system subjects and objects are assigned confidentiality labels, 62made up of a sensitivity level and zero or more compartments. 63Together, these label elements permit all labels to be placed in a partial 64order, with confidentiality protections based on a dominance operator 65describing the order. 66The sensitivity level is expressed as a value between 0 and 6765535, with higher values reflecting higher sensitivity levels. 68The compartment field is expressed as a set of up to 256 components, 69numbered from 1 to 256. 70A complete label consists of both sensitivity and compartment 71elements. 72.Pp 73With normal labels, dominance is defined as a label having a higher 74or equal active sensitivity level, and having at least 75all of the same compartments as the label to which it is being compared. 76With respect to label comparisons, 77.Dq lower 78is defined as being dominated by the label to which it is being compared, 79and 80.Dq higher 81is defined as dominating the label to which it is being compared, 82and 83.Dq equal 84is defined as both labels being able to satisfy the dominance requirements 85over one another. 86.Pp 87Three special label values exist: 88.Bl -column -offset indent "mls/equal" "dominated by all other labels" 89.It Sy Label Ta Sy Comparison 90.It Li mls/low Ta dominated by all other labels 91.It Li mls/equal Ta equal to all other labels 92.It Li mls/high Ta dominates all other labels 93.El 94.Pp 95The MLS model enforces the following basic restrictions: 96.Bl -bullet 97.It 98Subjects may not observe the processes of another subject if its 99clearance level is lower than the clearance level of the object it is 100attempting to observe. 101.It 102Subjects may not read, write, or otherwise observe objects without proper 103clearance (e.g. subjects may not observe objects whose classification label 104dominates its own clearance label) 105.It 106Subjects may not write to objects with a lower classification level than 107its own clearance level. 108.It 109A subject may read and write to an object if its clearance level is equal 110to the object's classification level as though MLS protections were not in 111place. 112.El 113.Pp 114These rules prevent subjects of lower clearance from gaining access 115information classified beyond its clearance level in order to protect the 116confidentiality of classified information, subjects of higher clearance 117from writing to objects of lower classification in order to prevent the 118accidental or malicious leaking of information, and subjects of lower 119clearance from observing subjects of higher clearance altogether. 120In traditional trusted operating systems, the MLS confidentiality model is 121used in concert with the Biba integrity model 122.Xr ( mac_biba 4 ) 123in order to protect the Trusted Code Base (TCB). 124.Ss Label Format 125Almost all system objects are tagged with a single, active label element, 126reflecting the classification of the object, or classification of the data 127contained in the object. 128In general, object labels are represented in the following form: 129.Pp 130.Dl mls/grade:compartments 131.Pp 132For example: 133.Pp 134.Bd -literal -offset indent 135mls/10:2+3+6++10 136mls/low 137.Ed 138.Pp 139Subject labels consist of three label elements: a single (active) label, 140as well as a range of available labels. 141This range is represented using two ordered MLS label elements, and when set 142on a process, permits the process to change its active label to any label of 143greater or equal integrity to the low end of the range, and lesser or equal 144integrity to the high end of the range. 145In general, subject labels are represented in the following form: 146.Pp 147.Dl mls/singlegrade:singlecompartments(lograde:locompartments- 148.Dl higrade:hicompartments) 149.Pp 150For example: 151.Bd -literal -offset indent 152mls/10:2+3+6(5-20:2+3+4+5+6) 153mls/high(low-high) 154.Ed 155.Pp 156Valid ranged labels must meet the following requirement regarding their 157elements: 158.Pp 159.Dl rangehigh >= single >= rangelow 160.Pp 161One class of objects with ranges currently exists, the network interface. 162In the case of the network interface, the single label element references 163the default label for packets received over the interface, and the range 164represents the range of acceptable labels of packets to be transmitted over 165the interface. 166.Sh IMPLEMENTATION NOTES 167Currently, the 168.Nm 169policy relies on superuser status 170.Xr ( suser 9 ) 171in order to change network interface MLS labels. 172This will eventually go away, but it is currently a liability and may 173allow the superuser to bypass MLS protections. 174.Sh SEE ALSO 175.Xr mac 4 , 176.Xr mac_biba 4 , 177.Xr mac_bsdextended 4 , 178.Xr mac_ifoff 4 , 179.Xr mac_lomac 4 , 180.Xr mac_mls 4 , 181.Xr mac_none 4 , 182.Xr mac_partition 4 , 183.Xr mac_seeotheruids 4 , 184.Xr mac_test 4 185.Xr maclabel 7 , 186.Xr mac 9 187.Sh HISTORY 188The 189.Nm 190policy module first appeared in 191.Fx 5.0 192and was developed by the TrustedBSD Project. 193.Sh AUTHORS 194This software was contributed to the 195.Fx 196Project by Network Associates Laboratories, 197the Security Research Division of Network Associates 198Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), 199as part of the DARPA CHATS research program. 200.Sh BUGS 201See 202.Xr mac 9 203concerning appropriateness for production use. 204The TrustedBSD MAC Framework is considered experimental in 205.Fx . 206.Pp 207While the MAC Framework design is intended to support the containment of 208the root user, not all attack channels are currently protected by entry 209point checks. 210As such, MAC Framework policies should not be relied on, in isolation, 211to protect against a malicious privileged user. 212