Bug 1960382 - Can't run graphical applications in SELinux sandbox
Summary: Can't run graphical applications in SELinux sandbox
Keywords:
Status: CLOSED DUPLICATE of bug 1978020
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-13 18:23 UTC by Marc Muehlfeld
Modified: 2021-12-22 19:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-22 19:31:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marc Muehlfeld 2021-05-13 18:23:30 UTC
Description of problem:
Can't run graphical applications in SELinux sandbox.


Version-Release number of selected component (if applicable):
policycoreutils-sandbox-3.2-1.fc34.x86_64
selinux-policy-sandbox-34.6-1.fc34.noarch
firefox-88.0.1-1.fc34.x86_64
cinnamon-4.8.6-5.fc34.x86_64


How reproducible:
Always


Steps to Reproduce:
$ sandbox -X -t sandbox_web_t firefox
dbus[6883]: Unable to set up transient service directory: Failed to create directory /run/user/1000/dbus-1: Permission denied

dbus-daemon[6883]: Cannot setup inotify for '/usr/share/dbus-1/session.d'; error 'Permission denied'
/usr/bin/firefox: line 196: getenforce: command not found
/usr/bin/firefox: line 196: [: !=: unary operator expected
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :1


$ sandbox -X keepassxc
dbus-daemon[9291]: Cannot setup inotify for '/usr/share/dbus-1/session.d'; error 'Permission denied'
XIO:  fatal IO error 2 (No such file or directory) on X server ":1"
      after 233 requests (233 known processed) with 8 events remaining.


Some other applications show no error, but they are also not started. For example:
$ sandbox -X nemo
$ sandbox -X xreader



Additional info:
Running non-graphical applications, for example "sandbox bash", works.

Comment 1 Nikola Knazekova 2021-12-14 17:30:02 UTC
Hi Marc,

I created PR to our policy with new rules: https://github.com/fedora-selinux/selinux-policy/pull/972

And enabled these booleans:

- setsebool -P use_fusefs_home_dirs 1
- setsebool -P xserver_clients_write_xshm 1

On Fedora34 I tested: 
$ sandbox -X -t sandbox_web_t firefox
$ sandbox -X keepassxc
$ sandbox -X nemo
$ sandbox -X xreader

And all applications are working. 

Nikola

Comment 2 Zdenek Pytela 2021-12-22 19:31:53 UTC

*** This bug has been marked as a duplicate of bug 1978020 ***


Note You need to log in before you can comment on or make changes to this bug.