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.\" 313cc3bf52SRuslan Ermilov.Dd November 18, 2002 323ebc28efSChris Costello.Dt MAC_BIBA 4 33*aa12cea2SUlrich Spörlein.Os 343ebc28efSChris Costello.Sh NAME 353ebc28efSChris Costello.Nm mac_biba 363cc3bf52SRuslan Ermilov.Nd "Biba data integrity policy" 373ebc28efSChris Costello.Sh SYNOPSIS 3817c5113aSChris CostelloTo compile Biba into your kernel, place the following lines in your kernel 3917c5113aSChris Costelloconfiguration file: 403cc3bf52SRuslan Ermilov.Bd -ragged -offset indent 413ebc28efSChris Costello.Cd "options MAC" 4217c5113aSChris Costello.Cd "options MAC_BIBA" 433cc3bf52SRuslan Ermilov.Ed 4417c5113aSChris Costello.Pp 4517c5113aSChris CostelloAlternately, to load the Biba module at boot time, place the following line 4617c5113aSChris Costelloin your kernel configuration file: 473cc3bf52SRuslan Ermilov.Bd -ragged -offset indent 4817c5113aSChris Costello.Cd "options MAC" 493cc3bf52SRuslan Ermilov.Ed 5017c5113aSChris Costello.Pp 5117c5113aSChris Costelloand in 5217c5113aSChris Costello.Xr loader.conf 5 : 533cc3bf52SRuslan Ermilov.Bd -literal -offset indent 543cc3bf52SRuslan Ermilovmac_biba_load="YES" 553cc3bf52SRuslan Ermilov.Ed 563ebc28efSChris Costello.Sh DESCRIPTION 573ebc28efSChris CostelloThe 583ebc28efSChris Costello.Nm 593ebc28efSChris Costellopolicy module implements the Biba integrity model, 603ebc28efSChris Costellowhich protects the integrity of system objects and subjects by means of 613ebc28efSChris Costelloa strict information flow policy. 623ebc28efSChris CostelloIn Biba, all system subjects and objects are assigned integrity labels, made 633ebc28efSChris Costelloup of hierarchal grades, and non-hierarchal components. 643ebc28efSChris CostelloTogether, these label elements permit all labels to be placed in a partial 653ebc28efSChris Costelloorder, with information flow protections based on a dominance operator 663ebc28efSChris Costellodescribing the order. 673ebc28efSChris CostelloThe hierarchal grade field is expressed as a value between 0 and 65535, 683ebc28efSChris Costellowith higher values reflecting higher integrity. 693ebc28efSChris CostelloThe non-hierarchal compartment field is expressed as a set of up to 256 703ebc28efSChris Costellocomponents, numbered from 0 to 255. 713ebc28efSChris CostelloA complete label consists of both hierarchal and non-hierarchal elements. 723ebc28efSChris Costello.Pp 733ebc28efSChris CostelloThree special label values exist: 743cc3bf52SRuslan Ermilov.Bl -column -offset indent ".Li biba/equal" "lower than all other labels" 75daa1772eSChris Costello.It Sy Label Ta Sy Comparison 763cc3bf52SRuslan Ermilov.It Li biba/low Ta "lower than all other labels" 773cc3bf52SRuslan Ermilov.It Li biba/equal Ta "equal to all other labels" 783cc3bf52SRuslan Ermilov.It Li biba/high Ta "higher than all other labels" 793ebc28efSChris Costello.El 803ebc28efSChris Costello.Pp 813ebc28efSChris CostelloThe 823cc3bf52SRuslan Ermilov.Dq Li biba/high 83660887c9STom Rhodeslabel is assigned to system objects which affect the integrity of the system 843ebc28efSChris Costelloas a whole. 853cc3bf52SRuslan ErmilovThe 863cc3bf52SRuslan Ermilov.Dq Li biba/equal 873cc3bf52SRuslan Ermilovlabel 883ebc28efSChris Costellomay be used to indicate that a particular subject or object is exempt from 893ebc28efSChris Costellothe Biba protections. 903ebc28efSChris CostelloThese special label values are not specified as containing any compartments, 913ebc28efSChris Costelloalthough in a label comparison, 923cc3bf52SRuslan Ermilov.Dq Li biba/high 933ebc28efSChris Costelloappears to contain all compartments, 943cc3bf52SRuslan Ermilov.Dq Li biba/equal 953ebc28efSChris Costellothe same compartments as the other label to which it is being compared, 963ebc28efSChris Costelloand 973cc3bf52SRuslan Ermilov.Dq Li biba/low 983ebc28efSChris Costellonone. 993ebc28efSChris Costello.Pp 1003ebc28efSChris CostelloIn general, Biba access control takes the following model: 1013ebc28efSChris Costello.Bl -bullet 1023ebc28efSChris Costello.It 1033ebc28efSChris CostelloA subject at the same integrity level as an object may both read from 1043ebc28efSChris Costelloand write to the object as though Biba protections were not in place. 1053ebc28efSChris Costello.It 1063ebc28efSChris CostelloA subject at a higher integrity level than an object may write to the object, 1073ebc28efSChris Costellobut not read the object. 1083ebc28efSChris Costello.It 1093ebc28efSChris CostelloA subject at a lower integrity level than an object may read the object, 1103ebc28efSChris Costellobut not write to the object. 1113ebc28efSChris Costello.It 1123ebc28efSChris CostelloIf the subject and object labels may not be compared in the partial order, 1133ebc28efSChris Costelloall access is restricted. 1143ebc28efSChris Costello.El 1153ebc28efSChris Costello.Pp 1163ebc28efSChris CostelloThese rules prevent subjects of lower integrity from influencing the 1173ebc28efSChris Costellobehavior of higher integrity subjects by preventing the flow of information, 1183ebc28efSChris Costelloand hence control, from allowing low integrity subjects to modify either 1193ebc28efSChris Costelloa high integrity object or high integrity subjects acting on those objects. 1203ebc28efSChris CostelloBiba integrity policies may be appropriate in a number of environments, 1213ebc28efSChris Costelloboth from the perspective of preventing corruption of the operating system, 1223ebc28efSChris Costelloand corruption of user data if marked as higher integrity than the attacker. 1233ebc28efSChris CostelloIn traditional trusted operating systems, the Biba integrity model is used 1243ebc28efSChris Costelloto protect the Trusted Code Base (TCB). 1253ebc28efSChris Costello.Pp 1263ebc28efSChris CostelloThe Biba integrity model is similar to 127bffbb1beSChristian Brueffer.Xr mac_lomac 4 , 1283ebc28efSChris Costellowith the exception that LOMAC permits access by a higher integrity subject 1293ebc28efSChris Costelloto a lower integrity object, but downgrades the integrity level of the subject 1303ebc28efSChris Costelloto prevent integrity rules from being violated. 1313ebc28efSChris CostelloBiba is a fixed label policy in that all subject and object label changes are 1323ebc28efSChris Costelloexplicit, whereas LOMAC is a floating label policy. 1333ebc28efSChris Costello.Pp 1343ebc28efSChris CostelloThe Biba integrity model is also similar to 1353ebc28efSChris Costello.Xr mac_mls 4 , 1363ebc28efSChris Costellowith the exception that the dominance operator and access rules are reversed, 1373ebc28efSChris Costellopreventing the downward flow of information rather than the upward flow of 1383ebc28efSChris Costelloinformation. 13957bd0fc6SJens SchweikhardtMulti-Level Security (MLS) protects the confidentiality, rather than the 1403ebc28efSChris Costellointegrity, of subjects and objects. 1413bc03c31SChris Costello.Ss Label Format 142da2fa159SRuslan ErmilovAlmost all system objects are tagged with an effective, active label element, 1433bc03c31SChris Costelloreflecting the integrity of the object, or integrity of the data contained 1443bc03c31SChris Costelloin the object. 1453bc03c31SChris CostelloIn general, objects labels are represented in the following form: 1463bc03c31SChris Costello.Pp 1473cc3bf52SRuslan Ermilov.Sm off 1483cc3bf52SRuslan Ermilov.D1 Li biba / Ar grade : compartments 1493cc3bf52SRuslan Ermilov.Sm on 1503bc03c31SChris Costello.Pp 1513bc03c31SChris CostelloFor example: 1523bc03c31SChris Costello.Bd -literal -offset indent 1533bc03c31SChris Costellobiba/10:2+3+6 1543bc03c31SChris Costellobiba/low 1553bc03c31SChris Costello.Ed 1563bc03c31SChris Costello.Pp 157da2fa159SRuslan ErmilovSubject labels consist of three label elements: an effective (active) label, 1583bc03c31SChris Costelloas well as a range of available labels. 1593bc03c31SChris CostelloThis range is represented using two ordered Biba label elements, and when set 1603bc03c31SChris Costelloon a process, permits the process to change its active label to any label of 1613bc03c31SChris Costellogreater or equal integrity to the low end of the range, and lesser or equal 1623bc03c31SChris Costellointegrity to the high end of the range. 1633bc03c31SChris CostelloIn general, subject labels are represented in the following form: 1643bc03c31SChris Costello.Pp 1653cc3bf52SRuslan Ermilov.Sm off 1660bbfd990SRobert Watson.D1 Li biba / Ar effectivegrade : effectivecompartments ( lograde : locompartments - 1673cc3bf52SRuslan Ermilov.D1 Ar higrade : hicompartments ) 1683cc3bf52SRuslan Ermilov.Sm on 1693bc03c31SChris Costello.Pp 1703bc03c31SChris CostelloFor example: 1713bc03c31SChris Costello.Bd -literal -offset indent 1723bc03c31SChris Costellobiba/10:2+3+6(5:2+3-20:2+3+4+5+6) 1733bc03c31SChris Costellobiba/high(low-high) 1743bc03c31SChris Costello.Ed 1753bc03c31SChris Costello.Pp 1763bc03c31SChris CostelloValid ranged labels must meet the following requirement regarding their 1773bc03c31SChris Costelloelements: 1783bc03c31SChris Costello.Pp 1790bbfd990SRobert Watson.D1 Ar rangehigh No \[>=] Ar effective No \[>=] Ar rangelow 1803bc03c31SChris Costello.Pp 1813bc03c31SChris CostelloOne class of objects with ranges currently exists, the network interface. 1820bbfd990SRobert WatsonIn the case of the network interface, the effective label element references the 1833bc03c31SChris Costellodefault label for packets received over the interface, and the range 1843bc03c31SChris Costellorepresents the range of acceptable labels of packets to be transmitted over 1853bc03c31SChris Costellothe interface. 1863bc03c31SChris Costello.Ss Runtime Configuration 1873bc03c31SChris CostelloThe following 1883bc03c31SChris Costello.Xr sysctl 8 1893bc03c31SChris CostelloMIBs are available for fine-tuning the enforcement of this MAC policy. 1903cc3bf52SRuslan Ermilov.Bl -tag -width ".Va security.mac.biba.ptys_equal" 1913bc03c31SChris Costello.It Va security.mac.biba.enabled 1923cc3bf52SRuslan ErmilovEnables enforcement of the Biba integrity policy. 1933cc3bf52SRuslan Ermilov(Default: 1). 1943bc03c31SChris Costello.It Va security.mac.biba.ptys_equal 1953bc03c31SChris CostelloLabel 1963cc3bf52SRuslan Ermilov.Xr pty 4 Ns s 1973bc03c31SChris Costelloas 1983cc3bf52SRuslan Ermilov.Dq Li biba/equal 1993cc3bf52SRuslan Ermilovupon creation. 2003cc3bf52SRuslan Ermilov(Default: 0). 2013bc03c31SChris Costello.It Va security.mac.biba.revocation_enabled 2023cc3bf52SRuslan ErmilovRevoke access to objects if the label is changed to dominate the subject. 2033cc3bf52SRuslan Ermilov(Default: 0). 2043bc03c31SChris Costello.El 2053ebc28efSChris Costello.Sh SEE ALSO 206ccf09d7cSChris Costello.Xr mac 4 , 20717c5113aSChris Costello.Xr mac_bsdextended 4 , 208057baf37SChris Costello.Xr mac_ifoff 4 , 2099cad8863SChris Costello.Xr mac_lomac 4 , 2103ebc28efSChris Costello.Xr mac_mls 4 , 21117c5113aSChris Costello.Xr mac_none 4 , 212057baf37SChris Costello.Xr mac_partition 4 , 2130c6e926fSChris Costello.Xr mac_portacl 4 , 21417c5113aSChris Costello.Xr mac_seeotheruids 4 , 21517c5113aSChris Costello.Xr mac_test 4 , 216075b064fSChris Costello.Xr maclabel 7 , 2173ebc28efSChris Costello.Xr mac 9 2183ebc28efSChris Costello.Sh HISTORY 2193ebc28efSChris CostelloThe 2203ebc28efSChris Costello.Nm 2213ebc28efSChris Costellopolicy module first appeared in 2223ebc28efSChris Costello.Fx 5.0 2233cc3bf52SRuslan Ermilovand was developed by the 2243cc3bf52SRuslan Ermilov.Tn TrustedBSD 2253cc3bf52SRuslan ErmilovProject. 2263ebc28efSChris Costello.Sh AUTHORS 2273ebc28efSChris CostelloThis software was contributed to the 2283ebc28efSChris Costello.Fx 2293ebc28efSChris CostelloProject by Network Associates Labs, 2303ebc28efSChris Costellothe Security Research Division of Network Associates 2315203edcdSRuslan ErmilovInc. 2325203edcdSRuslan Ermilovunder DARPA/SPAWAR contract N66001-01-C-8035 2333cc3bf52SRuslan Ermilov.Pq Dq CBOSS , 2343ebc28efSChris Costelloas part of the DARPA CHATS research program. 235