Skip to content

feat(selinux): Get rid of all file WX of Trivalent's Selinux trivalent_domain#666

Merged
RoyalOughtness merged 18 commits intosecureblue:livefrom
PhysicsIsAwesome:selinux-wx
Apr 2, 2026
Merged

feat(selinux): Get rid of all file WX of Trivalent's Selinux trivalent_domain#666
RoyalOughtness merged 18 commits intosecureblue:livefrom
PhysicsIsAwesome:selinux-wx

Conversation

@PhysicsIsAwesome
Copy link
Copy Markdown
Contributor

@PhysicsIsAwesome PhysicsIsAwesome commented Mar 22, 2026

This gets rid of all file WX of Trivalent's Selinux trivalent_domain I could find:

  • cache_home_t
  • chrome_sandbox_home_t
  • config_home_t
  • trivalent_home_t
  • trivalent_domain itself

It introduces a new on-by-default tunable trivalent_exec_flatpaks so people can disable execution of Flatpaks. Execution is needed for certain extensions being able to talk to their app counterpart like Keepassxc.

Additionally there is a tunable trivalent_drm which is on by-default. This allows file WX and needs to be turned off by users who want W^X at the expense of not being able to use DRM restricted content.

Testing done:

  • Started Trivalent
  • Visited a few websites including video content (Youtube)
  • Checked AVC logs
  • Deleted trivalent's folder in .config
  • Might need additional testing for edge cases
  • RPM spec file is untested, since it would take a very long time to build Trivalent on my device and I have little experience with spec files. Review and testing is needed.

Basically secureblue/secureblue#2029 plus the tmpfiles.d file

…valent_exec_flatpaks tunable

Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
This is used for widevine to mmap execute  files. It is useful to introduce a new type, so more general types like trivalent_home_t don't need execute permission. At the moment trivalent_home_t is WX, so this is a first step get rid of execute for that type.

Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
…as a file

Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
…tory

Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
…pm spec file

Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
@RoyalOughtness RoyalOughtness requested a review from RKNF404 March 23, 2026 15:59
RoyalOughtness
RoyalOughtness previously approved these changes Mar 23, 2026
Comment thread build/trivalent-drm-fix-secontexts.conf
@RoyalOughtness
Copy link
Copy Markdown
Contributor

@PhysicsIsAwesome did you confirm that protected content still works with this?

Copy link
Copy Markdown
Contributor

@HastD HastD left a comment

Choose a reason for hiding this comment

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

The policy changes look fine to me; just a few nitpicks about the packaging.

Comment thread build/trivalent.spec Outdated
Comment thread build/trivalent.spec Outdated
Comment thread build/trivalent.spec Outdated
Comment thread build/trivalent.spec
Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
Signed-off-by: PhysicsIsAwesome <69597878+PhysicsIsAwesome@users.noreply.github.com>
@PhysicsIsAwesome
Copy link
Copy Markdown
Contributor Author

@PhysicsIsAwesome did you confirm that protected content still works with this?

Yes. With trivalent_drm set to on, it works as expected. With off, websites still sometimes report that drm works, but, if you actually try to play drm protected content, it does not work.

Copy link
Copy Markdown
Collaborator

@RKNF404 RKNF404 left a comment

Choose a reason for hiding this comment

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

Lgtm

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 1, 2026

Not up to standards ⛔

🔴 Issues 1 medium

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
BestPractice 1 medium

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@RoyalOughtness RoyalOughtness merged commit d0086d4 into secureblue:live Apr 2, 2026
5 checks passed
@PhysicsIsAwesome PhysicsIsAwesome deleted the selinux-wx branch April 2, 2026 08:49
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.

5 participants