Index: head/share/man/man4/Makefile =================================================================== --- head/share/man/man4/Makefile (revision 112859) +++ head/share/man/man4/Makefile (revision 112860) @@ -1,332 +1,333 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 # $FreeBSD$ MAN= aac.4 \ acpi.4 \ adv.4 \ adw.4 \ agp.4 \ aha.4 \ ahb.4 \ ahc.4 \ ahd.4 \ aio.4 \ amd.4 \ amr.4 \ an.4 \ ata.4 \ atapicam.4 \ atkbd.4 \ atkbdc.4 \ aue.4 \ awi.4 \ bge.4 \ bktr.4 \ blackhole.4 \ bpf.4 \ bridge.4 \ bt.4 \ cardbus.4 \ ccd.4 \ cd.4 \ ch.4 \ ciss.4 \ crypto.4 \ csa.4 \ cue.4 \ da.4 \ dc.4 \ ddb.4 \ de.4 \ devctl.4 \ disc.4 \ divert.4 \ dpt.4 \ dummynet.4 \ ed.4 \ ef.4 \ em.4 \ exca.4 \ faith.4 \ fast_ipsec.4 \ fd.4 \ fdc.4 \ firewire.4 \ fpa.4 \ fwe.4 \ fwohci.4 \ fxp.4 \ gbde.4 \ geom.4 \ gif.4 \ gre.4 \ gusc.4 \ gx.4 \ hifn.4 \ ichsmb.4 \ icmp.4 \ icmp6.4 \ ida.4 \ ieee80211.4 \ ifmib.4 \ iic.4 \ iicbb.4 \ iicbus.4 \ iicsmb.4 \ iir.4 \ inet.4 \ inet6.4 \ intpm.4 \ intro.4 \ ip.4 \ ip6.4 \ ipfirewall.4 \ ipsec.4 \ isp.4 \ ispfw.4 \ joy.4 \ kame.4 \ keyboard.4 \ kld.4 \ kue.4 \ ktr.4 \ lge.4 \ lmc.4 \ lo.4 \ lomac.4 \ lp.4 \ lpbb.4 \ lpt.4 \ maestro3.4 \ md.4 \ mem.4 \ miibus.4 \ mlx.4 \ mly.4 \ mac.4 \ mac_biba.4 \ mac_bsdextended.4 \ mac_ifoff.4 \ mac_lomac.4 \ mac_mls.4 \ mac_none.4 \ mac_partition.4 \ + mac_portacl.4 \ mac_seeotheruids.4 \ mac_test.4 \ mouse.4 \ mtio.4 \ natm.4 \ ncr.4 \ netgraph.4 \ netintro.4 \ ng_UI.4 \ ng_async.4 \ ng_bluetooth.4 \ ng_bpf.4 \ ng_bridge.4 \ ng_bt3c.4 \ ng_btsocket.4 \ ng_cisco.4 \ ng_echo.4 \ ng_etf.4 \ ng_ether.4 \ ng_frame_relay.4 \ ng_gif.4 \ ng_h4.4 \ ng_hci.4 \ ng_hole.4 \ ng_iface.4 \ ng_ip_input.4 \ ng_ksocket.4 \ ng_l2cap.4 \ ng_l2tp.4 \ ng_lmi.4 \ ng_mppc.4 \ ng_one2many.4 \ ng_ppp.4 \ ng_pppoe.4 \ ng_pptpgre.4 \ ng_rfc1490.4 \ ng_socket.4 \ ng_tee.4 \ ng_tty.4 \ ng_ubt.4 \ ng_vjc.4 \ nge.4 \ nmdm.4 \ null.4 \ ohci.4 \ oldcard.4 \ orm.4 \ pass.4 \ pci.4 \ pccard.4 \ pccbb.4 \ pcic.4 \ pcm.4 \ pcn.4 \ pcvt.4 \ polling.4 \ ppbus.4 \ ppc.4 \ ppi.4 \ ppp.4 \ psm.4 \ pst.4 \ pt.4 \ pty.4 \ puc.4 \ raid.4 \ random.4 \ rl.4 \ rndtest.4 \ route.4 \ rp.4 \ sa.4 \ sbc.4 \ sbp.4 \ screen.4 \ scsi.4 \ sd.4 \ sem.4 \ ses.4 \ sf.4 \ si.4 \ sio.4 \ sis.4 \ sk.4 \ sl.4 \ smb.4 \ smbus.4 \ smp.4 \ sn.4 \ snp.4 \ spic.4 \ splash.4 \ sppp.4 \ st.4 \ ste.4 \ stf.4 \ sym.4 \ syncache.4 \ syncer.4 \ syscons.4 \ sysmouse.4 \ tap.4 \ targ.4 \ tcp.4 \ tdfx.4 \ termios.4 \ ti.4 \ tl.4 \ trm.4 \ ttcp.4 \ tty.4 \ tun.4 \ twe.4 \ txp.4 \ ubsa.4 \ ubsec.4 \ ucom.4 \ udbp.4 \ udp.4 \ uftdi.4 \ ugen.4 \ uhci.4 \ uhid.4 \ uhidev.4 \ ukbd.4 \ ulpt.4 \ umass.4 \ umodem.4 \ ums.4 \ unix.4 \ uplcom.4 \ urio.4 \ usb.4 \ uscanner.4 \ uvisor.4 \ uvscom.4 \ vga.4 \ vinum.4 \ vlan.4 \ vpo.4 \ vr.4 \ wb.4 \ wi.4 \ witness.4 \ worm.4 \ xl.4 \ xpt.4 \ zero.4 MLINKS= agp.4 agpgart.4 MLINKS+=an.4 if_an.4 MLINKS+=ata.4 acd.4 ata.4 ad.4 ata.4 afd.4 ata.4 ast.4 MLINKS+=aue.4 if_aue.4 MLINKS+=awi.4 if_awi.4 MLINKS+=bge.4 if_bge.4 MLINKS+=bktr.4 brooktree.4 MLINKS+=cue.4 if_cue.4 MLINKS+=dc.4 if_dc.4 MLINKS+=de.4 if_de.4 MLINKS+=disc.4 if_disc.4 MLINKS+=ed.4 if_ed.4 MLINKS+=ef.4 if_ef.4 MLINKS+=em.4 if_em.4 MLINKS+=faith.4 if_faith.4 MLINKS+=fd.4 stderr.4 fd.4 stdin.4 fd.4 stdout.4 MLINKS+=fpa.4 fea.4 MLINKS+=fwe.4 if_fwp.4 MLINKS+=fxp.4 if_fxp.4 MLINKS+=gif.4 if_gif.4 MLINKS+=gre.4 if_gre.4 MLINKS+=gx.4 if_gx.4 MLINKS+=ipfirewall.4 ipacct.4 ipfirewall.4 ipaccounting.4 ipfirewall.4 ipfw.4 MLINKS+=kue.4 if_kue.4 MLINKS+=lge.4 if_lge.4 MLINKS+=lo.4 loop.4 MLINKS+=lp.4 plip.4 MLINKS+=md.4 vn.4 MLINKS+=mem.4 kmem.4 MLINKS+=netintro.4 networking.4 MLINKS+=nge.4 if_nge.4 MLINKS+=oldcard.4 card.4 MLINKS+=pcm.4 snd.4 MLINKS+=pcn.4 if_pcn.4 MLINKS+=pcvt.4 vt.4 MLINKS+=ppp.4 if_ppp.4 MLINKS+=rl.4 if_rl.4 MLINKS+=scsi.4 CAM.4 MLINKS+=scsi.4 SCSI.4 MLINKS+=scsi.4 cam.4 MLINKS+=scsi.4 scbus.4 MLINKS+=sf.4 if_sf.4 MLINKS+=sis.4 if_sis.4 MLINKS+=sk.4 if_sk.4 MLINKS+=sl.4 if_sl.4 MLINKS+=smp.4 SMP.4 MLINKS+=sn.4 if_sn.4 MLINKS+=ste.4 if_ste.4 MLINKS+=stf.4 if_stf.4 MLINKS+=splash.4 screensaver.4 MLINKS+=syncache.4 syncookies.4 MLINKS+=syscons.4 sc.4 MLINKS+=tap.4 if_tap.4 MLINKS+=ti.4 if_ti.4 MLINKS+=tl.4 if_tl.4 MLINKS+=tun.4 if_tun.4 MLINKS+=txp.4 if_txp.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 MLINKS+=wb.4 if_wb.4 MLINKS+=wi.4 if_wi.4 MLINKS+=xl.4 if_xl.4 # XXX NOT IMPORTED: man4.hp300 man4.sparc man4.tahoe man4.vax .if exists(${.CURDIR}/man4.${MACHINE_ARCH}) SUBDIR= man4.${MACHINE_ARCH} .endif .include Index: head/share/man/man4/mac.4 =================================================================== --- head/share/man/man4/mac.4 (revision 112859) +++ head/share/man/man4/mac.4 (revision 112860) @@ -1,290 +1,292 @@ .\" Copyright (c) 2003 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Labs, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd JANUARY 8, 2003 .Os .Dt MAC 4 .Sh NAME .Nm mac .Nd Mandatory Access Control .Sh SYNOPSIS .Cd "options MAC" .Sh DESCRIPTION .Ss Introduction The Mandatory Access Control, or MAC, framework allows administrators to finely control system security by providing for a loadable security policy architecture. It is important to note that due to its nature, MAC security policies may only restrict access relative to one another and the base system policy; they cannot override traditional UNIX security provisions such as file permissions and superuser checks. .Pp Currently, the following MAC policy modules are shipped with .Fx : .Bl -column ".Xr mac_seeotheruids 4" "low-watermark mac policy " ".Em Labeling" "boot only" .It Sy Name Ta Sy Description Ta Sy Labeling Ta Sy "Load time" .It Xr mac_biba 4 Ta "Biba integrity policy" Ta yes Ta boot only .It Xr mac_bsdextended 4 Ta "File system firewall" Ta no Ta any time .It Xr mac_ifoff 4 Ta "Interface silencing" Ta no Ta any time .It Xr mac_lomac 4 Ta "Low-Watermark MAC policy" Ta yes Ta boot only .It Xr mac_mls 4 Ta "Confidentiality policy" Ta yes Ta boot only .It Xr mac_none 4 Ta "Sample no-op policy" Ta no Ta any time .It Xr mac_partition 4 Ta "Process partition policy" Ta yes Ta any time +.It Xr mac_portacl 4 Ta "Port bind(2) access control" Ta no Ta any time .It Xr mac_seeotheruids 4 Ta "See-other-UIDs policy" Ta no Ta any time .It Xr mac_test 4 Ta "MAC testing policy" Ta no Ta any time .El .Ss MAC Labels Each system subject (processes, sockets, etc.) and each system object (file system objects, sockets, etc.) can carry with it a MAC label. MAC labels contain data in an arbitrary format taken into consideration in making access control decisions for a given operation. Most MAC labels on system subjects and objects can be modified directly or indirectly by the system administrator. The format for a given policy's label may vary depending on the type of object or subject being labeled. More information on the format for MAC labels can be found in the .Xr maclabel 7 man page. .Ss MAC Support for UFS2 File Systems By default, file system enforcement of labeled MAC policies relies on a single file system label (see .Sx "MAC Labels" ) in order to make access control decisions for all the files in a particular file system. With some policies, this configuration may not allow administrators to take full advantage of features. In order to enable support for labeling files on an individual basis for a particular file system, the .Dq multilabel flag must be enabled on the file system. To set the .Dq multilabel flag, drop to single-user mode and unmount the file system, then execute the following command: .Pp .Dl "tunefs -l enable" Sy filesystem .Pp where .Sy filesystem is either the mount point (in .Xr fstab 5 ) or the special file (in .Pa /dev ) corresponding to the file system on which to enable multilabel support. .Ss Policy Enforcement MAC can be configured to enforce only specific portions of policies (see .Sx "Runtime Configuration" ) . Policy enforcement is divided into the following areas of the system: .Bl -ohang .It Sy File System File system mounts, modifying directories, modifying files, etc. .It Sy KLD Loading, unloading, and retrieving statistics on loaded kernel modules .It Sy Network Network interfaces, .Xr bpf 4 , packet delivery and transmission, interface configuration .Xr ( ioctl 2 , .Xr ifconfig 8 ) .It Sy Pipes Creation of and operation on .Xr pipe 2 objects .It Sy Processes Debugging (e.g. .Xr ktrace 2 ) , process visibility .Xr ( ps 1 ) , process execution .Xr ( execve 2 ) , signalling .Xr ( kill 2 ) .It Sy Sockets Creation of and operation on .Xr socket 2 objects .It Sy System Kernel environment .Xr ( kenv 1 ) , system accounting .Xr ( acct 2 ) , .Xr reboot 2 , .Xr settimeofday 2 , .Xr swapon 2 , .Xr sysctl 3 , .Sm off .Xr nfsd 8 - related .Sm on operations .It Sy VM .Sm off .Xr mmap 2 - ed .Sm on files .El .Ss Setting MAC Labels From the command line, each type of system object has its own means for setting and modifying its MAC policy label. .Bl -column "user (by login class)" "Xr setfmac 8 , Xr setfsmac 8" -offset indent .It Sy "Subject/Object" Ta Sy "Utility" .It "File system object" Ta Xr setfmac 8 , Xr setfsmac 8 .It "Network interface" Ta Xr ifconfig 8 .It "TTY (by login class)" Ta Xr login.conf 5 .It "User (by login class)" Ta Xr login.conf 5 .El .Pp Additionally, the .Xr su 1 and .Xr setpmac 8 utilities can be used to run a command with a different process label than the shell's current label. .Ss Programming With MAC MAC security enforcement itself is transparent to application programs, with the exception that some programs may need to be aware of additional .Xr errno 2 returns from various system calls. .Pp The interface for retrieving, handling, and setting policy labels is documented in the .Xr mac 3 man page. .Ss Runtime Configuration The following .Xr sysctl 8 MIBs are available for fine-tuning the enforcement of MAC policies. Unless specifically noted, all MIBs default to .Li 1 (that is, all areas are enforced by default): .Bl -tag -width "security.mac.enforce_network" .It Va security.mac.enforce_fs Enforce MAC policies for file system accesses .It Va security.mac.enforce_kld Enforce MAC policies on .Xr kld 4 .It Va security.mac.enforce_network Enforce MAC policies on network interfaces .It Va security.mac.enforce_pipe Enforce MAC policies on pipes .It Va security.mac.enforce_process Enforce MAC policies between system processes (e.g. .Xr ps 1 , .Xr ktrace 2 ) .It Va security.mac.enforce_socket Enforce MAC policies on sockets .It Va security.mac.enforce_system Enforce MAC policies on system-related items (e.g. .Xr kenv 1 , .Xr acct 2 , .Xr reboot 2 ) .It Va security.mac.enforce_vm Enforce MAC policies on .Xr mmap 2 and .Xr mprotect 2 .\" *** XXX *** .\" Support for this feature is poor and should not be encouraged. .\" .\" .It Va security.mac.mmap_revocation .\" Revoke .\" .Xr mmap 2 .\" access to files on subject relabel .\" .It Va security.mac.mmap_revocation_via_cow .\" Revoke .\" .Xr mmap 2 .\" access to files via copy-on-write semantics; .\" mapped regions will still appear writable, but will no longer .\" effect a change on the underlying vnode .\" (Default: 0) .El .Sh SEE ALSO .Xr mac 3 , .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , .Xr login.5 , .Xr maclabel 7 , .Xr getfmac 8 , .Xr setfmac 8 , .Xr getpmac 8 , .Xr setpmac 8 , .Xr mac 9 .Rs .%B "The FreeBSD Handbook" .%T "Mandatory Access Control" .%O http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mac.html .Re .Sh HISTORY The .Nm implementation first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. .Sh BUGS See .Xr mac 9 concerning appropriateness for production use. The TrustedBSD MAC Framework is considered experimental in .Fx . .Pp While the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by entry point checks. As such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user. Index: head/share/man/man4/mac_biba.4 =================================================================== --- head/share/man/man4/mac_biba.4 (revision 112859) +++ head/share/man/man4/mac_biba.4 (revision 112860) @@ -1,223 +1,224 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd NOVEMBER 18, 2002 .Os .Dt MAC_BIBA 4 .Sh NAME .Nm mac_biba .Nd Biba data integrity policy .Sh SYNOPSIS To compile Biba into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_BIBA" .Pp Alternately, to load the Biba module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf 5 : .Cd mac_biba_load= Ns \&"YES" .Sh DESCRIPTION The .Nm policy module implements the Biba integrity model, which protects the integrity of system objects and subjects by means of a strict information flow policy. In Biba, all system subjects and objects are assigned integrity labels, made up of hierarchal grades, and non-hierarchal components. Together, these label elements permit all labels to be placed in a partial order, with information flow protections based on a dominance operator describing the order. The hierarchal grade field is expressed as a value between 0 and 65535, with higher values reflecting higher integrity. The non-hierarchal compartment field is expressed as a set of up to 256 components, numbered from 0 to 255. A complete label consists of both hierarchal and non-hierarchal elements. .Pp Three special label values exist: .Bl -column -offset indent "biba/equal" "lower than all other labels" .It Sy Label Ta Sy Comparison .It Li biba/low Ta lower than all other labels .It Li biba/equal Ta equal to all other labels .It Li biba/high Ta higher than all other labels .El .Pp The .Dq biba/high label is assigned to system objects which affect the integrity of the system as a whole. .Dq biba/equal may be used to indicate that a particular subject or object is exempt from the Biba protections. These special label values are not specified as containing any compartments, although in a label comparison, .Dq biba/high appears to contain all compartments, .Dq biba/equal the same compartments as the other label to which it is being compared, and .Dq biba/low none. .Pp In general, Biba access control takes the following model: .Bl -bullet .It A subject at the same integrity level as an object may both read from and write to the object as though Biba protections were not in place. .It A subject at a higher integrity level than an object may write to the object, but not read the object. .It A subject at a lower integrity level than an object may read the object, but not write to the object. .It If the subject and object labels may not be compared in the partial order, all access is restricted. .El .Pp These rules prevent subjects of lower integrity from influencing the behavior of higher integrity subjects by preventing the flow of information, and hence control, from allowing low integrity subjects to modify either a high integrity object or high integrity subjects acting on those objects. Biba integrity policies may be appropriate in a number of environments, both from the perspective of preventing corruption of the operating system, and corruption of user data if marked as higher integrity than the attacker. In traditional trusted operating systems, the Biba integrity model is used to protect the Trusted Code Base (TCB). .Pp The Biba integrity model is similar to .Xr lomac 4 , with the exception that LOMAC permits access by a higher integrity subject to a lower integrity object, but downgrades the integrity level of the subject to prevent integrity rules from being violated. Biba is a fixed label policy in that all subject and object label changes are explicit, whereas LOMAC is a floating label policy. .Pp The Biba integrity model is also similar to .Xr mac_mls 4 , with the exception that the dominance operator and access rules are reversed, preventing the downward flow of information rather than the upward flow of information. Multi-Level Security (MLS) protects the confidentiality, rather than the integrity, of subjects and objects. .Ss Label Format Almost all system objects are tagged with a single, active label element, reflecting the integrity of the object, or integrity of the data contained in the object. In general, objects labels are represented in the following form: .Pp .Dl biba/grade:compartments .Pp For example: .Pp .Bd -literal -offset indent biba/10:2+3+6 biba/low .Ed .Pp Subject labels consist of three label elements: a single (active) label, as well as a range of available labels. This range is represented using two ordered Biba label elements, and when set on a process, permits the process to change its active label to any label of greater or equal integrity to the low end of the range, and lesser or equal integrity to the high end of the range. In general, subject labels are represented in the following form: .Pp .Dl biba/singlegrade:singlecompartments(lograde:locompartments- .Dl higrade:hicompartments) .Pp For example: .Bd -literal -offset indent biba/10:2+3+6(5:2+3-20:2+3+4+5+6) biba/high(low-high) .Ed .Pp Valid ranged labels must meet the following requirement regarding their elements: .Pp .Dl rangehigh >= single >= rangelow .Pp One class of objects with ranges currently exists, the network interface. In the case of the network interface, the single label element references the default label for packets received over the interface, and the range represents the range of acceptable labels of packets to be transmitted over the interface. .Ss Runtime Configuration The following .Xr sysctl 8 MIBs are available for fine-tuning the enforcement of this MAC policy. .Bl -tag -width 'security.mac.biba.ptys_equal' .It Va security.mac.biba.enabled Enables enforcement of the Biba integrity policy (Default: 1) .It Va security.mac.biba.ptys_equal Label .Sm off .Xr pty 4 s .Sm on as .Dq biba/equal upon creation (Default: 0) .It Va security.mac.biba.revocation_enabled Revoke access to objects if the label is changed to dominate the subject (Default: 0) .El .Sh SEE ALSO .Xr lomac 4 , .Xr mac 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , .Xr maclabel 7 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. Index: head/share/man/man4/mac_bsdextended.4 =================================================================== --- head/share/man/man4/mac_bsdextended.4 (revision 112859) +++ head/share/man/man4/mac_bsdextended.4 (revision 112860) @@ -1,99 +1,100 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd OCTOBER 16, 2002 .Os .Dt MAC_BSDEXTENDED 4 .Sh NAME .Nm mac_bsdextended .Nd file system firewall policy .Sh SYNOPSIS To compile the file system firewall policy into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_BSDEXTENDED" .Pp Alternately, to load the file system firewall policy module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf 5 : .Cd mac_bsdextended_load= Ns \&"YES" .Sh DESCRIPTION The .Nm interface provides an interface for the system administrator to impose mandatory rules regarding users and some system objects. Rules are uploaded to the module (typically using .Xr ugidfw 8 , or some other tool utilizing .Xr libugidfw 3 ) where they are stored internally and used to determine whether to allow or deny specific accesses (see .Xr ugidfw 8 ) . .Sh IMPLEMENTATION NOTES While the traditional .Xr mac 9 entry points are implemented, policy labels are not used; instead, access control decisions are made by iterating through the internal list of rules until a rule which denies the particular access is found, or the end of the list is reached. .Sh SEE ALSO .Xr libugidfw 3 , .Xr mac 4 , .Xr mac_biba 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , .Xr ugidfw 8 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by NAI Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. Index: head/share/man/man4/mac_ifoff.4 =================================================================== --- head/share/man/man4/mac_ifoff.4 (revision 112859) +++ head/share/man/man4/mac_ifoff.4 (revision 112860) @@ -1,129 +1,130 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd DECEMBER 10, 2002 .Os .Dt MAC_IFOFF 4 .Sh NAME .Nm mac_ifoff .Nd interface silencing policy .Sh SYNOPSIS To compile the interface silencing policy into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_IFOFF" .Pp Alternately, to load the interface silencing policy module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf 5 : .Cd mac_ifoff_load= Ns \&"YES" .Sh DESCRIPTION The .Nm interface silencing module allows administrators to enable and disable incoming and outgoing data flow on system network interfaces via the .Xr sysctl 8 interface. .Pp To disable network traffic over the loopback .Xr ( lo 4 ) interface, set the .Xr sysctl 8 OID .Va security.mac.ifoff.lo_enabled to .Li 0 (default .Li 1 ) . .Pp To enable network traffic over other interfaces, set the .Xr sysctl 8 OID .Va security.mac.ifoff.other_enabled to .Li 1 (default .Li 0 ) . .Pp To allow BPF traffic to be received, even while other traffic is disabled, set the .Xr sysctl 8 OID .Va security.mac.ifoff.bpfrecv_enabled to .Li 1 (default .Li 0 ) . .Ss Label Format No labels are defined. .Sh SEE ALSO .Xr lomac 4 , .Xr mac 4 , .Xr mac_bsdextended 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. .Sh BUGS See .Xr mac 9 concerning appropriateness for production use. The TrustedBSD MAC Framework is considered experimental in .Fx . .Pp While the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by entry point checks. As such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user. Index: head/share/man/man4/mac_lomac.4 =================================================================== --- head/share/man/man4/mac_lomac.4 (revision 112859) +++ head/share/man/man4/mac_lomac.4 (revision 112860) @@ -1,197 +1,198 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd December 11, 2002 .Os .Dt MAC_LOMAC 4 .Sh NAME .Nm mac_lomac .Nd Low-watermark Mandatory Access Control data integrity policy .Sh SYNOPSIS To compile LOMAC into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_LOMAC" .Pp Alternately, to load the LOMAC module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf 5 : .Cd mac_lomac_load= Ns \&"YES" .Sh DESCRIPTION The .Nm policy module implements the LOMAC integrity model, which protects the integrity of system objects and subjects by means of an information flow policy coupled with the subject demotion via floating labels. In LOMAC, all system subjects and objects are assigned integrity labels, made up of one or more hierarchal grades, depending on the their types. Together, these label elements permit all labels to be placed in a partial order, with information flow protections and demotion decisions based on a dominance operator describing the order. The hierarchal grade field or fields are expressed as a value between 0 and 65535, with higher values reflecting higher integrity. .Pp Three special label component values exist: .Bl -column -offset indent ".Sy Label" "dominated by all other labels" .It Sy Label Ta Sy Comparison .It Li low Ta dominated by all other labels .It Li equal Ta equal to all other labels .It Li high Ta dominates all other labels .El .Pp The .Dq high label is assigned to system objects which affect the integrity of the system as a whole. .Dq equal may be used to indicate that a particular subject or object is exempt from the LOMAC protections. For example, a label of .Dq lomac/equal(equal-equal) might be used on a subject which is to be used to administratively relabel anything on the system. .Pp Almost all system objects are tagged with a single, active label element, reflecting the integrity of the object, or integrity of the data contained in the object. Filesystem objects may contain an additional auxiliary label which determines the inherited integrity level for new files created in a directory or the alternate label assumed by the subject upon execution of an executable. In general, objects labels are represented in the following form: .Pp .Dl lomac/ Ns Sy grade Ns [ Sy auxgrade ] .Pp For example: .Pp .Bd -literal -offset indent lomac/10[2] lomac/low .Ed .Pp Subject labels consist of three label elements: a single (active) label, as well as a range of available labels. This range is represented using two ordered LOMAC label elements, and when set on a process, permits the process to change its active label to any label of greater or equal integrity to the low end of the range, and lesser or equal integrity to the high end of the range. In general, subject labels are represented in the following form: .Pp .Dl lomac/ Ns Sy singlegrade Ns ( Sy lograde Ns - Ns Sy higrade ) .Pp Modification of objects is restricted to access via the following comparison: .Pp .Dl subject::higrade >= target-object::grade .Pp Modification of subjects is the same, as the target subject's single grade is the only element taken into comparison. .Pp Demotion of a subject occurs when the following comparison is true: .Pp .Dl subject::singlegrade > object::grade .Pp When demotion occurs, the subject's singlegrade and higrade are reduced to the object's grade, as well as the lograde if necessary. When the demotion occurs, in addition to the permission of the subject being reduced, shared .Xr mmap 2 objects which it has opened in its memory space may be revoked according to the following .Xr sysctl 2 variables: .Bl -bullet .It .Va security.mac.lomac.revocation_enabled .It .Va security.mac.enforce_vm .It .Va security.mac.mmap_revocation .It .Va security.mac.mmap_revocation_via_cow .El .Pp Upon execution of a file, if the executable has an auxiliary label, and that label is within the current range of .Sy lograde-higrade , it will be assumed by the subject immediately. After this, demotion is performed just as with any other read operation, with the executable as the target. Through the use of auxiliary labels, programs may be initially executed at a lower effective integrity level, while retaining the ability to raise it again. .Pp These rules prevent subjects of lower integrity from influencing the behavior of higher integrity subjects by preventing the flow of information, and hence control, from allowing low integrity subjects to modify either a high integrity object or high integrity subjects acting on those objects. LOMAC integrity policies may be appropriate in a number of environments, both from the perspective of preventing corruption of the operating system, and corruption of user data if marked as higher integrity than the attacker. .Pp The LOMAC security model is quite similar to that of .Xr mac_biba 4 and .Xr mac_mls 4 in various ways. More background information on this can be found in their respective man pages. .Sh SEE ALSO .Xr mmap 2 , .Xr sysctl 2 , .Xr mac 4 , .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_mls 4 , .Xr mac_none 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. Index: head/share/man/man4/mac_mls.4 =================================================================== --- head/share/man/man4/mac_mls.4 (revision 112859) +++ head/share/man/man4/mac_mls.4 (revision 112860) @@ -1,239 +1,240 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd DECEMBER 1, 2002 .Os .Dt MAC_MLS 4 .Sh NAME .Nm mac_mls .Nd Multi-Level Security confidentiality policy .Sh SYNOPSIS To compile MLS into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_MLS" .Pp Alternately, to load the MLS module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf 5 : .Cd mac_mls_load= Ns \&"YES" .Sh DESCRIPTION The .Nm policy module implements the Multi-Level Security, or MLS model, which controls access between subjects and objects based on their confidentiality by means of a strict information flow policy. Each subject and object in the system has an MLS label associated with it; each subject's MLS label contains information on its clearance level, and each object's MLS label contains information on its classification. .Pp In MLS, all system subjects and objects are assigned confidentiality labels, made up of a sensitivity level and zero or more compartments. Together, these label elements permit all labels to be placed in a partial order, with confidentiality protections based on a dominance operator describing the order. The sensitivity level is expressed as a value between 0 and 65535, with higher values reflecting higher sensitivity levels. The compartment field is expressed as a set of up to 256 components, numbered from 1 to 256. A complete label consists of both sensitivity and compartment elements. .Pp With normal labels, dominance is defined as a label having a higher or equal active sensitivity level, and having at least all of the same compartments as the label to which it is being compared. With respect to label comparisons, .Dq lower is defined as being dominated by the label to which it is being compared, and .Dq higher is defined as dominating the label to which it is being compared, and .Dq equal is defined as both labels being able to satisfy the dominance requirements over one another. .Pp Three special label values exist: .Bl -column -offset indent "mls/equal" "dominated by all other labels" .It Sy Label Ta Sy Comparison .It Li mls/low Ta dominated by all other labels .It Li mls/equal Ta equal to all other labels .It Li mls/high Ta dominates all other labels .El .Pp The .Dq mls/equal label may be applied to subjects and objects for which no enforcement of the MLS security policy is desired. .Pp The MLS model enforces the following basic restrictions: .Bl -bullet .It Subjects may not observe the processes of another subject if its clearance level is lower than the clearance level of the object it is attempting to observe. .It Subjects may not read, write, or otherwise observe objects without proper clearance (e.g. subjects may not observe objects whose classification label dominates its own clearance label) .It Subjects may not write to objects with a lower classification level than its own clearance level. .It A subject may read and write to an object if its clearance level is equal to the object's classification level as though MLS protections were not in place. .El .Pp These rules prevent subjects of lower clearance from gaining access information classified beyond its clearance level in order to protect the confidentiality of classified information, subjects of higher clearance from writing to objects of lower classification in order to prevent the accidental or malicious leaking of information, and subjects of lower clearance from observing subjects of higher clearance altogether. In traditional trusted operating systems, the MLS confidentiality model is used in concert with the Biba integrity model .Xr ( mac_biba 4 ) in order to protect the Trusted Code Base (TCB). .Ss Label Format Almost all system objects are tagged with a single, active label element, reflecting the classification of the object, or classification of the data contained in the object. In general, object labels are represented in the following form: .Pp .Dl mls/grade:compartments .Pp For example: .Pp .Bd -literal -offset indent mls/10:2+3+6 mls/low .Ed .Pp Subject labels consist of three label elements: a single (active) label, as well as a range of available labels. This range is represented using two ordered MLS label elements, and when set on a process, permits the process to change its active label to any label of greater or equal integrity to the low end of the range, and lesser or equal integrity to the high end of the range. In general, subject labels are represented in the following form: .Pp .Dl mls/singlegrade:singlecompartments(lograde:locompartments- .Dl higrade:hicompartments) .Pp For example: .Bd -literal -offset indent mls/10:2+3+6(5:2+3-20:2+3+4+5+6) mls/high(low-high) .Ed .Pp Valid ranged labels must meet the following requirement regarding their elements: .Pp .Dl rangehigh >= single >= rangelow .Pp One class of objects with ranges currently exists, the network interface. In the case of the network interface, the single label element references the default label for packets received over the interface, and the range represents the range of acceptable labels of packets to be transmitted over the interface. .Ss Runtime Configuration The following .Xr sysctl 8 MIBs are available for fine-tuning the enforcement of this MAC policy. .Bl -tag -width security.mac.mls.enabled .It Va security.mac.mls.enabled Enables the enforcement of the MLS confidentiality policy (Default: 1) .It Va security.mac.mls.ptys_equal Label .Sm off .Xr pty 4 s .Sm on as .Dq mls/equal upon creation (Default: 0) .It Va security.mac.mls.revocation_enabled Revoke access to objects if the label is changed to a more sensitive level than the subject (Default: 0) .El .Sh IMPLEMENTATION NOTES Currently, the .Nm policy relies on superuser status .Xr ( suser 9 ) in order to change network interface MLS labels. This will eventually go away, but it is currently a liability and may allow the superuser to bypass MLS protections. .Sh SEE ALSO .Xr mac 4 , .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 .Xr maclabel 7 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Laboratories, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. .Sh BUGS See .Xr mac 9 concerning appropriateness for production use. The TrustedBSD MAC Framework is considered experimental in .Fx . .Pp While the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by entry point checks. As such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user. Index: head/share/man/man4/mac_none.4 =================================================================== --- head/share/man/man4/mac_none.4 (revision 112859) +++ head/share/man/man4/mac_none.4 (revision 112860) @@ -1,97 +1,98 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd DECEMBER 1, 2002 .Os .Dt MAC_NONE 4 .Sh NAME .Nm mac_none .Nd sample MAC policy module .Sh SYNOPSIS To compile the sample policy into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_NONE" .Pp Alternately, to load the sample module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf 5 : .Cd mac_none_load= Ns \&"YES" .Sh DESCRIPTION The .Nm policy module implements a sample MAC policy that has no effect on access control in the system. Each MAC entry point is a .Dq no-op . .Ss Label Format No labels are defined for .Nm . .Sh SEE ALSO .Xr mac 4 , .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. .Sh BUGS See .Xr mac 9 concerning appropriateness for production use. The TrustedBSD MAC Framework is considered experimental in .Fx . .Pp While the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by entry point checks. As such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user. Index: head/share/man/man4/mac_partition.4 =================================================================== --- head/share/man/man4/mac_partition.4 (revision 112859) +++ head/share/man/man4/mac_partition.4 (revision 112860) @@ -1,119 +1,120 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd DECEMBER 9, 2002 .Os .Dt MAC_PARTITION 4 .Sh NAME .Nm mac_partition .Nd process partition policy .Sh SYNOPSIS To compile the process partition policy into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_PARTITION" .Pp Alternately, to load the process partition module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf 5 : .Cd mac_partition_load= Ns \&"YES" .Sh DESCRIPTION The .Nm policy module implements a process partition policy, which allows administrators to place running processes into .Dq partitions, based on their numeric process partition (specified in the process's MAC label). Processes with a specified partition can only see processes that are in the same partition. If no partition is specified for a process, it can see all other processes in the system (subject to other MAC policy restrictions not defined in this man page). No provisions for placing processes into multiple partitions is available. .Ss Label Format Partition labels take on the following format: .Pp .Dl partition/ Ns Sy value .Pp Where .Sy value can be any integer value or .Dq none . For example: .Pp .Bd -literal -offset indent partition/1 partition/20 partition/none .Ed .Sh SEE ALSO .Xr lomac 4 , .Xr mac 4 , .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , .Xr maclabel 7 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. .Sh BUGS See .Xr mac 9 concerning appropriateness for production use. The TrustedBSD MAC Framework is considered experimental in .Fx . .Pp While the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by entry point checks. As such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user. Index: head/share/man/man4/mac_seeotheruids.4 =================================================================== --- head/share/man/man4/mac_seeotheruids.4 (revision 112859) +++ head/share/man/man4/mac_seeotheruids.4 (revision 112860) @@ -1,117 +1,118 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd DECEMBER 8, 2002 .Os .Dt MAC_SEEOTHERUIDS 4 .Sh NAME .Nm mac_seeotheruids .Nd simple policy controlling whether users see other users .Sh SYNOPSIS To compile the mac_seeotheruids policy into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_SEEOTHERUIDS" .Pp Alternately, to load the module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf.5 : .Cd mac_seeotheruids_load= Ns \&"YES" .Sh DESCRIPTION The .Nm policy module, when enabled, denies users to see processes or sockets owned by other users. .Pp To enable .Nm , set the sysctl OID .Va security.mac.seeotheruids.enabled to .Li 1 . .Pp To allow users to see processes and sockets owned by the same primary group, set the sysctl OID .Va security.mac.seeotheruids.primarygroup_enabled to .Li 1 . .Pp To allow processes with a specific group ID to be exempt from the policy, set the sysctl OID .Va security.mac.seeotheruids.specificgid_enabled to .Li 1 , and .Va security.mac.seeotheruids.specificgid to the gid to be exempted. .Ss Label Format No labels are defined for .Nm . .Sh SEE ALSO .Xr mac 4 , .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_none 4 , .Xr mac_test 4 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. .Sh BUGS See .Xr mac 9 concerning appropriateness for production use. The TrustedBSD MAC Framework is considered experimental in .Fx . .Pp While the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by entry point checks. As such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user. Index: head/share/man/man4/mac_stub.4 =================================================================== --- head/share/man/man4/mac_stub.4 (revision 112859) +++ head/share/man/man4/mac_stub.4 (revision 112860) @@ -1,97 +1,98 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd DECEMBER 1, 2002 .Os .Dt MAC_NONE 4 .Sh NAME .Nm mac_none .Nd sample MAC policy module .Sh SYNOPSIS To compile the sample policy into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_NONE" .Pp Alternately, to load the sample module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf 5 : .Cd mac_none_load= Ns \&"YES" .Sh DESCRIPTION The .Nm policy module implements a sample MAC policy that has no effect on access control in the system. Each MAC entry point is a .Dq no-op . .Ss Label Format No labels are defined for .Nm . .Sh SEE ALSO .Xr mac 4 , .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. .Sh BUGS See .Xr mac 9 concerning appropriateness for production use. The TrustedBSD MAC Framework is considered experimental in .Fx . .Pp While the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by entry point checks. As such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user. Index: head/share/man/man4/mac_test.4 =================================================================== --- head/share/man/man4/mac_test.4 (revision 112859) +++ head/share/man/man4/mac_test.4 (revision 112860) @@ -1,103 +1,104 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris Costello .\" at Safeport Network Services and Network Associates Laboratories, the .\" Security Research Division of Network Associates, Inc. under .\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the .\" DARPA CHATS research program. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd DECEMBER 1, 2002 .Os .Dt MAC_TEST 4 .Sh NAME .Nm mac_test .Nd MAC framework testing policy .Sh SYNOPSIS To compile the testing policy into your kernel, place the following lines in your kernel configuration file: .Cd "options MAC" .Cd "options MAC_TEST" .Pp Alternately, to load the testing module at boot time, place the following line in your kernel configuration file: .Cd "options MAC" .Pp and in .Xr loader.conf.5 : .Cd mac_test_load= Ns \&"YES" .Sh DESCRIPTION The .Nm policy module implements a testing facility for the MAC framework. Among other things, .Nm will try to catch corrupt labels the system is attempting to destroy and drop to the debugger. Additionally, a set of statistics regarding the number of times various MAC framework entry points have been called is stored in the .Va security.mac.test .Xr sysctl 8 tree. .Ss Label Format No labels are defined for .Nm . .Sh SEE ALSO .Xr mac 4 , .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , .Xr mac_partition 4 , +.Xr mac_portacl 4 , .Xr mac_seeotheruids 4 , .Xr mac 9 .Sh HISTORY The .Nm policy module first appeared in .Fx 5.0 and was developed by the TrustedBSD Project. .Sh AUTHORS This software was contributed to the .Fx Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. .Sh BUGS See .Xr mac 9 concerning appropriateness for production use. The TrustedBSD MAC Framework is considered experimental in .Fx . .Pp While the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by entry point checks. As such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user.