<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/security/mac_lomac, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>http://cgit.freebsd.org/src/atom?h=main</id>
<link rel='self' href='http://cgit.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<updated>2025-12-04T19:52:59Z</updated>
<entry>
<title>MAC: Rename mac_cred_create_swapper to mac_cred_create_kproc0</title>
<updated>2025-12-04T19:52:59Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-12-04T19:52:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=61ffc1bf8c4288c18d0ef86877e2558fa7ae3e13'/>
<id>urn:sha1:61ffc1bf8c4288c18d0ef86877e2558fa7ae3e13</id>
<content type='text'>
Reported by:	markj
Reviewed by:	olce
Differential Revision:	https://reviews.freebsd.org/D54052
</content>
</entry>
<entry>
<title>MAC: mac_biba, mac_lomac: Fix setting loader tunables</title>
<updated>2025-02-09T15:53:29Z</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2025-02-09T15:53:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7d4c0fac8c7db9c5741ba98a8b3ce3c43feb1cf4'/>
<id>urn:sha1:7d4c0fac8c7db9c5741ba98a8b3ce3c43feb1cf4</id>
<content type='text'>
A string loader tunable requires setting the len parameter to a nonzero
value, typically the size of the string, to have the flag CTLFLAG_TUN
work correctly [1] [2].

Without this fix security.mac.{biba,lomac}.trusted_interfaces would
have no effect at all.

[1] 3da1cf1e88f8 Extend the meaning of the CTLFLAG_TUN flag to automatically ...
[2] 6a3287f889b0 Fix regression issue after r267961. Handle special string case ...

Reviewed by:	olce, kib
Fixes:		af3b2549c4ba Pull in r267961 and r267973 again ...
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D48898
</content>
</entry>
<entry>
<title>MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes</title>
<updated>2024-12-16T14:42:28Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce@FreeBSD.org</email>
</author>
<published>2024-07-04T14:08:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=db33c6f3ae9d1231087710068ee4ea5398aacca7'/>
<id>urn:sha1:db33c6f3ae9d1231087710068ee4ea5398aacca7</id>
<content type='text'>
Do this only when the headers for these functionalities were included
prior to this one.  Indeed, if they need to be included, style(9)
mandates they should have been so before this one.

Remove the common MAC sysctl declaration from
&lt;security/mac/mac_internal.h&gt;, as it is now redundant (all its includers
also include &lt;security/mac/mac_policy.h&gt;).

Remove local such declarations from all policies' files.

Reviewed by:    jamie
Approved by:    markj (mentor)
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D46903
</content>
</entry>
<entry>
<title>cr_canseejailproc(): New privilege, no direct check for UID 0</title>
<updated>2023-09-28T14:42:22Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce.freebsd@certner.fr</email>
</author>
<published>2023-08-17T23:54:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7974ca1cdbee949f5e453eea112be265b425c407'/>
<id>urn:sha1:7974ca1cdbee949f5e453eea112be265b425c407</id>
<content type='text'>
Use priv_check_cred() with a new privilege (PRIV_SEEJAILPROC) instead of
explicitly testing for UID 0 (the former has been the rule for almost 20
years).

As a consequence, cr_canseejailproc() now abides by the
'security.bsd.suser_enabled' sysctl and MAC policies.

Update the MAC policies Biba and LOMAC, and prison_priv_check() so that
they don't deny this privilege.  This preserves the existing behavior
(the 'root' user is not restricted, even when jailed, unless
'security.bsd.suser_enabled' is not 0) and is consistent with what is
done for the related policies/privileges (PRIV_SEEOTHERGIDS,
PRIV_SEEOTHERUIDS).

Reviewed by:            emaste (earlier version), mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40626
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:11Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=95ee2897e98f5d444f26ed2334cc7c439f9c16c6'/>
<id>urn:sha1:95ee2897e98f5d444f26ed2334cc7c439f9c16c6</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
</entry>
<entry>
<title>IfAPI: Add if_get/setmaclabel() and use it.</title>
<updated>2023-01-31T20:02:15Z</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2023-01-23T14:34:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=30af2c131bb05528f9b14518a7ed3e98c590b55e'/>
<id>urn:sha1:30af2c131bb05528f9b14518a7ed3e98c590b55e</id>
<content type='text'>
Summary:
Port the MAC modules to use the IfAPI APIs as part of this.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	glebius
Differential Revision: https://reviews.freebsd.org/D38197
</content>
</entry>
<entry>
<title>mac_lomac: whack giant usage</title>
<updated>2022-11-15T14:31:41Z</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2022-11-15T14:31:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=60bae7ec045a8af6e9c51ac080e51948fe84bb4d'/>
<id>urn:sha1:60bae7ec045a8af6e9c51ac080e51948fe84bb4d</id>
<content type='text'>
It does not protect anything, the code looks dodgy regardless.
</content>
</entry>
<entry>
<title>AST: rework</title>
<updated>2022-08-02T18:11:09Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2022-07-18T16:39:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c6d31b8306eb708441c61c33bcf886ecad268a16'/>
<id>urn:sha1:c6d31b8306eb708441c61c33bcf886ecad268a16</id>
<content type='text'>
Make most AST handlers dynamically registered.  This allows to have
subsystem-specific handler source located in the subsystem files,
instead of making subr_trap.c aware of it.  For instance, signal
delivery code on return to userspace is now moved to kern_sig.c.

Also, it allows to have some handlers designated as the cleanup (kclear)
type, which are called both at AST and on thread/process exit.  For
instance, ast(), exit1(), and NFS server no longer need to be aware
about UFS softdep processing.

The dynamic registration also allows third-party modules to register AST
handlers if needed.  There is one caveat with loadable modules: the
code does not make any effort to ensure that the module is not unloaded
before all threads processed through AST handler in it.  In fact, this
is already present behavior for hwpmc.ko and ufs.ko.  I do not think it
is worth the efforts and the runtime overhead to try to fix it.

Reviewed by:	markj
Tested by:	emaste (arm64), pho
Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
</content>
</entry>
<entry>
<title>Add PRIV_SCHED_IDPRIO</title>
<updated>2021-12-10T02:54:48Z</updated>
<author>
<name>Florian Walpen</name>
<email>dev@submerge.ch</email>
</author>
<published>2021-12-10T01:43:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a20a2450cd5f38fb28d5fa5540177edfb60d2473'/>
<id>urn:sha1:a20a2450cd5f38fb28d5fa5540177edfb60d2473</id>
<content type='text'>
The privilege allows the holder to assign idle priority type to thread
or process.

MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D33338
</content>
</entry>
<entry>
<title>security: clean up empty lines in .c and .h files</title>
<updated>2020-09-01T21:26:00Z</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2020-09-01T21:26:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e5ecee7440496904939e936501d0db93bed15415'/>
<id>urn:sha1:e5ecee7440496904939e936501d0db93bed15415</id>
<content type='text'>
</content>
</entry>
</feed>
