|
Revision tags: release/15.1.0-p3, release/15.0.0-p13, release/14.4.0-p9 |
|
| #
96bf3490 |
| 24-Aug-2026 |
Mark Johnston <markj@FreeBSD.org> |
cred: Fix group_is_primary()
This helper wasn't updated in commit be1f7435ef21, so in reality it was testing whether "gid" is the first supplemental group. If a user doesn't belong to a supplementa
cred: Fix group_is_primary()
This helper wasn't updated in commit be1f7435ef21, so in reality it was testing whether "gid" is the first supplemental group. If a user doesn't belong to a supplementary group, then it's testing an uninitialized slot; since ucreds are allocated with M_ZERO, this typically means that we're testing gid == 0.
group_is_primary() has exactly one use, in mac_do. There, it's used to determine whether the requested primary GID can be used in a setcred(2) call when the ruleset does not explicitly specify a target primary GID.
I believe this is mostly exploitable by daemons which have explicitly dropped privileges and called setgroups(0, NULL); logged in users will have a non-empty supplementary group list by virtue of having gone through initgroups(3).
Fix group_is_primary(), and add a regression test.
Approved by: so Security: FreeBSD-SA-26:59.mac_do Security: CVE-2026-58092 Reported by: Hazley Samsudin of GovTech CSG Fixes: be1f7435ef21 ("kern: start tracking cr_gid outside of cr_groups[]") Reviewed by: olce, kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59051
show more ...
|
|
Revision tags: release/15.1.0-p2, release/15.0.0-p12, release/14.4.0-p8, release/15.0.0-p11, release/14.3.0-p16, release/14.4.0-p7, release/15.1.0-p1, release/15.1.0, release/15.0.0-p10, release/14.4.0-p6, release/14.3.0-p15 |
|
| #
85149904 |
| 22-May-2026 |
Olivier Certner <olce@FreeBSD.org> |
MAC/do: Add consistency tests
Test that: 1. Concurrent changes to different parameters on the same jail are independent/atomic. 2. Inheritance works. 3. Relaxing only parent jail rules does not l
MAC/do: Add consistency tests
Test that: 1. Concurrent changes to different parameters on the same jail are independent/atomic. 2. Inheritance works. 3. Relaxing only parent jail rules does not leak to a subjail thanks to sequential consistency. 4. Sysctl knobs and jail parameters stay consistent.
Some of these tests may be extended in the future with several layers of jails (there is only a single subjail currently).
Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
show more ...
|
| #
61591873 |
| 22-May-2026 |
Olivier Certner <olce@FreeBSD.org> |
MAC/do: Tests: Declare required programs closer to use
Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pull
MAC/do: Tests: Declare required programs closer to use
Reviewed by: bapt MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
show more ...
|
| #
cba191e2 |
| 21-May-2026 |
Olivier Certner <olce@FreeBSD.org> |
MAC/do: Add basic tests on setting rules
MFC after: 1 minute Sponsored by: The FreeBSD Foundation
|