Skip to content

libsepol,checkpolicy: introduce unconfined as a first class concept t… #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stephensmalley
Copy link
Member

…o SELinux

Introduce unconfined as a first class concept to SELinux. Previously, SELinux had no such concept and unconfined domains were solely defined by policy.

Advantages of elevating to a first class concept:

  1. Explicit allow rules for unconfined domains can be omitted, shrinking the policy.
  2. The kernel can leverage this knowledge to further optimize checking on unconfined processes.

Disadvantages:

  1. Yet another juicy target for exploit writers, similar to permissive types.
  2. Requires a new policy version/format and bitmap.

…o SELinux

Introduce unconfined as a first class concept to SELinux. Previously,
SELinux had no such concept and unconfined domains were solely defined
by policy.

Advantages of elevating to a first class concept:
1. Explicit allow rules for unconfined domains can be omitted, shrinking the policy.
2. The kernel can leverage this knowledge to further optimize checking on unconfined processes.

Disadvantages:
1. Yet another juicy target for exploit writers, similar to permissive types.
2. Requires a new policy version/format and bitmap.

Signed-off-by: Stephen Smalley <[email protected]>
@@ -1520,7 +1542,7 @@ void policydb_destroy(policydb_t * p)

ebitmap_destroy(&p->policycaps);

ebitmap_destroy(&p->permissive_map);
ebitmap_destroy(&p->unconfined_map);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks wrong

@cgzones
Copy link
Contributor

cgzones commented Apr 25, 2025

Maybe add a statement to https://github.com/SELinuxProject/selinux/blob/main/checkpolicy/tests/policy_allonce.conf for a trivial round-trip test?

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.

2 participants