MAC_LOMAC(4)
π mac_lomac β Low-watermark Mandatory Access Control data integrity policy π
okay bestie, pull up a chair, because this is the mac_lomac page from the Kernel Interfaces Manual and it's literally about keeping your system's integrity from getting absolutely wrecked. no cap. π«Ά
β¨ NAME β¨
mac_lomac β Low-watermark Mandatory Access Control data integrity policy
π SYNOPSIS π
so like, there's two ways to do this. Option one, you compile LOMAC into your kernel β drop these lines into your kernel configuration file:
options MAC
options MAC_LOMAC
orrr, alternately, if you want to load the LOMAC module at boot time instead, put this line in your kernel configuration file:
options MAC
and then in loader.conf(5):
mac_lomac_load="YES"
both are valid, it's giving "choose your own adventure" energy. π
π¦ DESCRIPTION π¦
The mac_lomac 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 hierarchical grades, depending on 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. π₯
Three special label component values exist, and they're kinda the main characters:
lowβ dominated by all other labelsequalβ equal to all other labelshighβ dominates all other labels
The βhighβ label is assigned to system objects which affect the integrity of the system as a whole. The βequalβ label may be used to indicate that a particular subject or object is exempt from the LOMAC protections. For example, a label of βlomac/equal(equal-equal)β might be used on a subject which is to be used to administratively relabel anything on the system. (yes, that's a lot of equals. she's exempt, she does what she wants. π)
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. File system 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:
lomac/grade[auxgrade]
For example:
lomac/10[2]
lomac/low
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:
lomac/singlegrade(lograde-higrade)
Modification of objects is restricted to access via the following comparison:
subject::higrade β₯ target-object::grade
Modification of subjects is the same, as the target subject's single grade is the only element taken into comparison.
Demotion of a subject occurs when the following comparison is true:
subject::singlegrade > object::grade
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 mmap(2) objects which it has opened in its memory space may be revoked according to the following sysctl(3) variables:
security.mac.lomac.revocation_enabledsecurity.mac.enforce_vmsecurity.mac.mmap_revocationsecurity.mac.mmap_revocation_via_cow
Upon execution of a file, if the executable has an auxiliary label, and that label is within the current range of 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. β¨ (she can go low, but she can always come back up, periodt.)
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. π‘οΈ
The LOMAC security model is quite similar to that of mac_biba(4) and mac_mls(4) in various ways. More background information on this can be found in their respective man pages.
π SEE ALSO π
mmap(2), sysctl(3), mac(4), mac_biba(4), mac_bsdextended(4), mac_ifoff(4), mac_mls(4), mac_none(4), mac_partition(4), mac_portacl(4), mac_seeotheruids(4), mac_test(4), mac(9)
πΈ HISTORY πΈ
The mac_lomac policy module first appeared in FreeBSD 5.0 and was developed by the TrustedBSD Project. vintage, honestly. π
π§ AUTHORS π§
This software was contributed to the FreeBSD 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.
and that's the whole page bestie, every last detail, nothing skipped, we ate that π β¨ this one's from the Debian crew, dated February 25, 2012 β love that for us, stay safe out there and keep your integrity high π¦π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2002 Networks Associates Technology, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms