Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1978020

Summary: selinux-policy-sandbox broken after update to Version 34.12 Release 1.fc34
Product: [Fedora] Fedora Reporter: Timo Trinks <ttrinks>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 34CC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Timo Trinks 2021-07-01 00:00:21 UTC
Description of problem:

After upgrading to "selinux-policy-sandbox-34.11-1.fc34.noarch" on Fedora 34 running Firefox in sandbox now fails with:

<snip>

[user@host:~()]$ sandbox -X -t sandbox_net_t -t sandbox_web_t -w 1280x1024 firefox
dbus[13634]: Unable to set up transient service directory: Failed to create directory /run/user/1000/dbus-1: Permission denied

dbus-daemon[13634]: 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: :2

<snap>

Version-Release number of selected component (if applicable):

Version: 34.12
Release: 1.fc34

How reproducible:

Always

Steps to Reproduce:
1. run "sandbox -X -t sandbox_net_t -t sandbox_web_t -w 1280x1024 firefox" on Fedora 34 with selinux-policy-sandbox-34.12-1.fc34.noarch installed
2.
3.

Actual results:

<snip>

[user@host:~()]$ sandbox -X -t sandbox_net_t -t sandbox_web_t -w 1280x1024 firefox
dbus[13634]: Unable to set up transient service directory: Failed to create directory /run/user/1000/dbus-1: Permission denied

dbus-daemon[13634]: 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: :2

<snap>

Expected results:

Be able to run Firefox via SELinux Sandbox.

Additional info:

Comment 1 Timo Trinks 2021-07-01 00:36:13 UTC
To add to this:

After downgrading to selinux-policy-sandbox-34-1.fc34.noarch and relabelling the file system via /.autorelabel "sandbox -X -t sandbox_net_t -t sandbox_web_t -w 1280x1024 firefox" works (again).

Comment 2 Timo Trinks 2021-07-15 00:23:20 UTC
@zpytela - This appears to be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1960382

The following two temporary setsebools make running X applications via sandbox work again for me (tested with selinux-policy-sandbox-34.13-1.fc34.noarch):

- setsebool -P domain_can_mmap_files 1
- setsebool -P xserver_clients_write_xshm 1

After that "sandbox -X -t sandbox_net_t -t sandbox_web_t -w 1280x1024 firefox" would start a sandboxed Firefox again and not throw the errors listed above.