Skip to content

fix: deny userns creation for userdomain, not just unconfined_t#1204

Merged
RoyalOughtness merged 2 commits intosecureblue:livefrom
HastD:userns-selinux
Jul 30, 2025
Merged

fix: deny userns creation for userdomain, not just unconfined_t#1204
RoyalOughtness merged 2 commits intosecureblue:livefrom
HastD:userns-selinux

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented Jul 24, 2025

The userdomain attribute includes not just unconfined_t but also user_t, staff_t, sysadm_t, etc so the restrictions on user namespace creation also apply to confined users.

Also simplify the relabeling deny rules using attributes.

The `userdomain` attribute includes not just `unconfined_t` but also
`user_t`, `staff_t`, `sysadm_t`, etc so the restrictions on user
namespace creation also apply to confined users.

Signed-off-by: Daniel Hast <[email protected]>
@HastD HastD marked this pull request as draft July 28, 2025 13:49
@HastD

This comment was marked as resolved.

@HastD HastD marked this pull request as ready for review July 28, 2025 14:23
@HastD HastD requested a review from RoyalOughtness July 28, 2025 14:23
@RoyalOughtness RoyalOughtness merged commit 6bc6ec4 into secureblue:live Jul 30, 2025
25 of 28 checks passed
@HastD HastD deleted the userns-selinux branch July 30, 2025 01:25
RoyalOughtness pushed a commit to RoyalOughtness/secureblue-dev that referenced this pull request Aug 4, 2025
…reblue#1204)

* fix: deny userns creation for userdomain, not just unconfined_t

The `userdomain` attribute includes not just `unconfined_t` but also
`user_t`, `staff_t`, `sysadm_t`, etc so the restrictions on user
namespace creation also apply to confined users.

Signed-off-by: Daniel Hast <[email protected]>

* refactor: use attributes to simplify relabel deny rules

---------

Signed-off-by: Daniel Hast <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants