xref: /freebsd/share/man/man4/mac_biba.4 (revision 0bbfd99009cc8e15b7c9a3ec3b46ba14c96f1ce4)
10bbfd990SRobert Watson.\" Copyright (c) 2002-2004 Networks Associates Technology, Inc.
23ebc28efSChris Costello.\" All rights reserved.
33ebc28efSChris Costello.\"
45792da74SChris Costello.\" This software was developed for the FreeBSD Project by Chris Costello
55792da74SChris Costello.\" at Safeport Network Services and Network Associates Laboratories, the
65792da74SChris Costello.\" Security Research Division of Network Associates, Inc. under
75792da74SChris Costello.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
85792da74SChris Costello.\" DARPA CHATS research program.
93ebc28efSChris Costello.\"
103ebc28efSChris Costello.\" Redistribution and use in source and binary forms, with or without
113ebc28efSChris Costello.\" modification, are permitted provided that the following conditions
123ebc28efSChris Costello.\" are met:
133ebc28efSChris Costello.\" 1. Redistributions of source code must retain the above copyright
143ebc28efSChris Costello.\"    notice, this list of conditions and the following disclaimer.
153ebc28efSChris Costello.\" 2. Redistributions in binary form must reproduce the above copyright
163ebc28efSChris Costello.\"    notice, this list of conditions and the following disclaimer in the
173ebc28efSChris Costello.\"    documentation and/or other materials provided with the distribution.
183ebc28efSChris Costello.\"
193ebc28efSChris Costello.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
203ebc28efSChris Costello.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
213ebc28efSChris Costello.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
223ebc28efSChris Costello.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
233ebc28efSChris Costello.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
243ebc28efSChris Costello.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
253ebc28efSChris Costello.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
263ebc28efSChris Costello.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
273ebc28efSChris Costello.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
283ebc28efSChris Costello.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
293ebc28efSChris Costello.\" SUCH DAMAGE.
303ebc28efSChris Costello.\"
313ebc28efSChris Costello.\" $FreeBSD$
323cc3bf52SRuslan Ermilov.\"
333cc3bf52SRuslan Ermilov.Dd November 18, 2002
343ebc28efSChris Costello.Os
353ebc28efSChris Costello.Dt MAC_BIBA 4
363ebc28efSChris Costello.Sh NAME
373ebc28efSChris Costello.Nm mac_biba
383cc3bf52SRuslan Ermilov.Nd "Biba data integrity policy"
393ebc28efSChris Costello.Sh SYNOPSIS
4017c5113aSChris CostelloTo compile Biba into your kernel, place the following lines in your kernel
4117c5113aSChris Costelloconfiguration file:
423cc3bf52SRuslan Ermilov.Bd -ragged -offset indent
433ebc28efSChris Costello.Cd "options MAC"
4417c5113aSChris Costello.Cd "options MAC_BIBA"
453cc3bf52SRuslan Ermilov.Ed
4617c5113aSChris Costello.Pp
4717c5113aSChris CostelloAlternately, to load the Biba module at boot time, place the following line
4817c5113aSChris Costelloin your kernel configuration file:
493cc3bf52SRuslan Ermilov.Bd -ragged -offset indent
5017c5113aSChris Costello.Cd "options MAC"
513cc3bf52SRuslan Ermilov.Ed
5217c5113aSChris Costello.Pp
5317c5113aSChris Costelloand in
5417c5113aSChris Costello.Xr loader.conf 5 :
553cc3bf52SRuslan Ermilov.Bd -literal -offset indent
563cc3bf52SRuslan Ermilovmac_biba_load="YES"
573cc3bf52SRuslan Ermilov.Ed
583ebc28efSChris Costello.Sh DESCRIPTION
593ebc28efSChris CostelloThe
603ebc28efSChris Costello.Nm
613ebc28efSChris Costellopolicy module implements the Biba integrity model,
623ebc28efSChris Costellowhich protects the integrity of system objects and subjects by means of
633ebc28efSChris Costelloa strict information flow policy.
643ebc28efSChris CostelloIn Biba, all system subjects and objects are assigned integrity labels, made
653ebc28efSChris Costelloup of hierarchal grades, and non-hierarchal components.
663ebc28efSChris CostelloTogether, these label elements permit all labels to be placed in a partial
673ebc28efSChris Costelloorder, with information flow protections based on a dominance operator
683ebc28efSChris Costellodescribing the order.
693ebc28efSChris CostelloThe hierarchal grade field is expressed as a value between 0 and 65535,
703ebc28efSChris Costellowith higher values reflecting higher integrity.
713ebc28efSChris CostelloThe non-hierarchal compartment field is expressed as a set of up to 256
723ebc28efSChris Costellocomponents, numbered from 0 to 255.
733ebc28efSChris CostelloA complete label consists of both hierarchal and non-hierarchal elements.
743ebc28efSChris Costello.Pp
753ebc28efSChris CostelloThree special label values exist:
763cc3bf52SRuslan Ermilov.Bl -column -offset indent ".Li biba/equal" "lower than all other labels"
77daa1772eSChris Costello.It Sy Label Ta Sy Comparison
783cc3bf52SRuslan Ermilov.It Li biba/low Ta "lower than all other labels"
793cc3bf52SRuslan Ermilov.It Li biba/equal Ta "equal to all other labels"
803cc3bf52SRuslan Ermilov.It Li biba/high Ta "higher than all other labels"
813ebc28efSChris Costello.El
823ebc28efSChris Costello.Pp
833ebc28efSChris CostelloThe
843cc3bf52SRuslan Ermilov.Dq Li biba/high
85660887c9STom Rhodeslabel is assigned to system objects which affect the integrity of the system
863ebc28efSChris Costelloas a whole.
873cc3bf52SRuslan ErmilovThe
883cc3bf52SRuslan Ermilov.Dq Li biba/equal
893cc3bf52SRuslan Ermilovlabel
903ebc28efSChris Costellomay be used to indicate that a particular subject or object is exempt from
913ebc28efSChris Costellothe Biba protections.
923ebc28efSChris CostelloThese special label values are not specified as containing any compartments,
933ebc28efSChris Costelloalthough in a label comparison,
943cc3bf52SRuslan Ermilov.Dq Li biba/high
953ebc28efSChris Costelloappears to contain all compartments,
963cc3bf52SRuslan Ermilov.Dq Li biba/equal
973ebc28efSChris Costellothe same compartments as the other label to which it is being compared,
983ebc28efSChris Costelloand
993cc3bf52SRuslan Ermilov.Dq Li biba/low
1003ebc28efSChris Costellonone.
1013ebc28efSChris Costello.Pp
1023ebc28efSChris CostelloIn general, Biba access control takes the following model:
1033ebc28efSChris Costello.Bl -bullet
1043ebc28efSChris Costello.It
1053ebc28efSChris CostelloA subject at the same integrity level as an object may both read from
1063ebc28efSChris Costelloand write to the object as though Biba protections were not in place.
1073ebc28efSChris Costello.It
1083ebc28efSChris CostelloA subject at a higher integrity level than an object may write to the object,
1093ebc28efSChris Costellobut not read the object.
1103ebc28efSChris Costello.It
1113ebc28efSChris CostelloA subject at a lower integrity level than an object may read the object,
1123ebc28efSChris Costellobut not write to the object.
1133ebc28efSChris Costello.It
1143ebc28efSChris CostelloIf the subject and object labels may not be compared in the partial order,
1153ebc28efSChris Costelloall access is restricted.
1163ebc28efSChris Costello.El
1173ebc28efSChris Costello.Pp
1183ebc28efSChris CostelloThese rules prevent subjects of lower integrity from influencing the
1193ebc28efSChris Costellobehavior of higher integrity subjects by preventing the flow of information,
1203ebc28efSChris Costelloand hence control, from allowing low integrity subjects to modify either
1213ebc28efSChris Costelloa high integrity object or high integrity subjects acting on those objects.
1223ebc28efSChris CostelloBiba integrity policies may be appropriate in a number of environments,
1233ebc28efSChris Costelloboth from the perspective of preventing corruption of the operating system,
1243ebc28efSChris Costelloand corruption of user data if marked as higher integrity than the attacker.
1253ebc28efSChris CostelloIn traditional trusted operating systems, the Biba integrity model is used
1263ebc28efSChris Costelloto protect the Trusted Code Base (TCB).
1273ebc28efSChris Costello.Pp
1283ebc28efSChris CostelloThe Biba integrity model is similar to
1293ebc28efSChris Costello.Xr lomac 4 ,
1303ebc28efSChris Costellowith the exception that LOMAC permits access by a higher integrity subject
1313ebc28efSChris Costelloto a lower integrity object, but downgrades the integrity level of the subject
1323ebc28efSChris Costelloto prevent integrity rules from being violated.
1333ebc28efSChris CostelloBiba is a fixed label policy in that all subject and object label changes are
1343ebc28efSChris Costelloexplicit, whereas LOMAC is a floating label policy.
1353ebc28efSChris Costello.Pp
1363ebc28efSChris CostelloThe Biba integrity model is also similar to
1373ebc28efSChris Costello.Xr mac_mls 4 ,
1383ebc28efSChris Costellowith the exception that the dominance operator and access rules are reversed,
1393ebc28efSChris Costellopreventing the downward flow of information rather than the upward flow of
1403ebc28efSChris Costelloinformation.
14157bd0fc6SJens SchweikhardtMulti-Level Security (MLS) protects the confidentiality, rather than the
1423ebc28efSChris Costellointegrity, of subjects and objects.
1433bc03c31SChris Costello.Ss Label Format
1440bbfd990SRobert WatsonAlmost all system objects are tagged with a effective, active label element,
1453bc03c31SChris Costelloreflecting the integrity of the object, or integrity of the data contained
1463bc03c31SChris Costelloin the object.
1473bc03c31SChris CostelloIn general, objects labels are represented in the following form:
1483bc03c31SChris Costello.Pp
1493cc3bf52SRuslan Ermilov.Sm off
1503cc3bf52SRuslan Ermilov.D1 Li biba / Ar grade : compartments
1513cc3bf52SRuslan Ermilov.Sm on
1523bc03c31SChris Costello.Pp
1533bc03c31SChris CostelloFor example:
1543bc03c31SChris Costello.Pp
1553bc03c31SChris Costello.Bd -literal -offset indent
1563bc03c31SChris Costellobiba/10:2+3+6
1573bc03c31SChris Costellobiba/low
1583bc03c31SChris Costello.Ed
1593bc03c31SChris Costello.Pp
1600bbfd990SRobert WatsonSubject labels consist of three label elements: a effective (active) label,
1613bc03c31SChris Costelloas well as a range of available labels.
1623bc03c31SChris CostelloThis range is represented using two ordered Biba label elements, and when set
1633bc03c31SChris Costelloon a process, permits the process to change its active label to any label of
1643bc03c31SChris Costellogreater or equal integrity to the low end of the range, and lesser or equal
1653bc03c31SChris Costellointegrity to the high end of the range.
1663bc03c31SChris CostelloIn general, subject labels are represented in the following form:
1673bc03c31SChris Costello.Pp
1683cc3bf52SRuslan Ermilov.Sm off
1690bbfd990SRobert Watson.D1 Li biba / Ar effectivegrade : effectivecompartments ( lograde : locompartments -
1703cc3bf52SRuslan Ermilov.D1 Ar higrade : hicompartments )
1713cc3bf52SRuslan Ermilov.Sm on
1723bc03c31SChris Costello.Pp
1733bc03c31SChris CostelloFor example:
1743bc03c31SChris Costello.Bd -literal -offset indent
1753bc03c31SChris Costellobiba/10:2+3+6(5:2+3-20:2+3+4+5+6)
1763bc03c31SChris Costellobiba/high(low-high)
1773bc03c31SChris Costello.Ed
1783bc03c31SChris Costello.Pp
1793bc03c31SChris CostelloValid ranged labels must meet the following requirement regarding their
1803bc03c31SChris Costelloelements:
1813bc03c31SChris Costello.Pp
1820bbfd990SRobert Watson.D1 Ar rangehigh No \[>=] Ar effective No \[>=] Ar rangelow
1833bc03c31SChris Costello.Pp
1843bc03c31SChris CostelloOne class of objects with ranges currently exists, the network interface.
1850bbfd990SRobert WatsonIn the case of the network interface, the effective label element references the
1863bc03c31SChris Costellodefault label for packets received over the interface, and the range
1873bc03c31SChris Costellorepresents the range of acceptable labels of packets to be transmitted over
1883bc03c31SChris Costellothe interface.
1893bc03c31SChris Costello.Ss Runtime Configuration
1903bc03c31SChris CostelloThe following
1913bc03c31SChris Costello.Xr sysctl 8
1923bc03c31SChris CostelloMIBs are available for fine-tuning the enforcement of this MAC policy.
1933cc3bf52SRuslan Ermilov.Bl -tag -width ".Va security.mac.biba.ptys_equal"
1943bc03c31SChris Costello.It Va security.mac.biba.enabled
1953cc3bf52SRuslan ErmilovEnables enforcement of the Biba integrity policy.
1963cc3bf52SRuslan Ermilov(Default: 1).
1973bc03c31SChris Costello.It Va security.mac.biba.ptys_equal
1983bc03c31SChris CostelloLabel
1993cc3bf52SRuslan Ermilov.Xr pty 4 Ns s
2003bc03c31SChris Costelloas
2013cc3bf52SRuslan Ermilov.Dq Li biba/equal
2023cc3bf52SRuslan Ermilovupon creation.
2033cc3bf52SRuslan Ermilov(Default: 0).
2043bc03c31SChris Costello.It Va security.mac.biba.revocation_enabled
2053cc3bf52SRuslan ErmilovRevoke access to objects if the label is changed to dominate the subject.
2063cc3bf52SRuslan Ermilov(Default: 0).
2073bc03c31SChris Costello.El
2083ebc28efSChris Costello.Sh SEE ALSO
20912cfff28SChris Costello.Xr lomac 4 ,
210ccf09d7cSChris Costello.Xr mac 4 ,
21117c5113aSChris Costello.Xr mac_bsdextended 4 ,
212057baf37SChris Costello.Xr mac_ifoff 4 ,
2139cad8863SChris Costello.Xr mac_lomac 4 ,
2143ebc28efSChris Costello.Xr mac_mls 4 ,
21517c5113aSChris Costello.Xr mac_none 4 ,
216057baf37SChris Costello.Xr mac_partition 4 ,
2170c6e926fSChris Costello.Xr mac_portacl 4 ,
21817c5113aSChris Costello.Xr mac_seeotheruids 4 ,
21917c5113aSChris Costello.Xr mac_test 4 ,
220075b064fSChris Costello.Xr maclabel 7 ,
2213ebc28efSChris Costello.Xr mac 9
2223ebc28efSChris Costello.Sh HISTORY
2233ebc28efSChris CostelloThe
2243ebc28efSChris Costello.Nm
2253ebc28efSChris Costellopolicy module first appeared in
2263ebc28efSChris Costello.Fx 5.0
2273cc3bf52SRuslan Ermilovand was developed by the
2283cc3bf52SRuslan Ermilov.Tn TrustedBSD
2293cc3bf52SRuslan ErmilovProject.
2303ebc28efSChris Costello.Sh AUTHORS
2313ebc28efSChris CostelloThis software was contributed to the
2323ebc28efSChris Costello.Fx
2333ebc28efSChris CostelloProject by Network Associates Labs,
2343ebc28efSChris Costellothe Security Research Division of Network Associates
2355203edcdSRuslan ErmilovInc.
2365203edcdSRuslan Ermilovunder DARPA/SPAWAR contract N66001-01-C-8035
2373cc3bf52SRuslan Ermilov.Pq Dq CBOSS ,
2383ebc28efSChris Costelloas part of the DARPA CHATS research program.
239