Bug 1473754
| Summary: | Electrolysis enablement and inter-process communication causing SELinux errors | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | R P Herrold <herrold> |
| Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> |
| Status: | CLOSED WONTFIX | QA Contact: | Milos Malik <mmalik> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 7.3 | CC: | lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde, tpelka |
| Target Milestone: | rc | Keywords: | Reopened |
| 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: | 2017-08-30 13:48:05 UTC | 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
R P Herrold
2017-07-21 14:37:03 UTC
I added some detail and narrative to my invocation of FF This session is nothing more than starting the script, which performs the actions in question noted in the userid contexts shown, and then typing: <ctrl-T> and in that opened tab, pasting the URL needed to update this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1473754 privacy enhanced, isolated firefox invocation current id: uid=500(herrold) gid=500(herrold) groups=500(herrold),10(wheel),135(mock),498(pulse-access) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 PEFF: ghola note: ghola is a non-priv'd user on localhost, which we access via a keyed SSH connection to try to avoid some content exfiltration by hostile web browser applications: Flash, etc THISHOST: centos-7.first.owlriver.net Command: ssh -X -t -t -l ghola centos-7.first.owlriver.net firefox --no-remote now down in non-privacy enhanced firefox userid current id: uid=606(ghola) gid=606(ghola) groups=606(ghola),498(pulse-access) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 Command: umask 022 ; /usr/bin/firefox --no-remote --no-remote [Parent 22460] WARNING: pipe error (62): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (74): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (67): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (65): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (66): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0085,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv [Parent 22460] WARNING: pipe error (62): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (74): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (67): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (65): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0085,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv [Parent 22460] WARNING: pipe error (66): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (62): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (75): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (68): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (66): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (67): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0085,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv [Parent 22460] WARNING: pipe error (62): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (75): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (68): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (66): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 [Parent 22460] WARNING: pipe error (67): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322 ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0085,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv and the SELinux denials and noise, through close of the firefox
[root@centos-7 audit]# tail -f audit.log | grep -v ssh | grep -v crond | grep -v success
type=AVC msg=audit(1500648664.601:11945): avc: denied { name_connect } for pid=22560 comm="plugin-containe" dest=6010 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xserver_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1500648664.601:11946): avc: denied { name_connect } for pid=22560 comm="plugin-containe" dest=6010 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xserver_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1500648664.702:11947): avc: denied { name_connect } for pid=22564 comm="plugin-containe" dest=6010 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xserver_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1500648664.702:11948): avc: denied { name_connect } for pid=22564 comm="plugin-containe" dest=6010 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xserver_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1500648664.794:11949): avc: denied { name_connect } for pid=22568 comm="plugin-containe" dest=6010 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xserver_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1500648664.794:11950): avc: denied { name_connect } for pid=22568 comm="plugin-containe" dest=6010 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xserver_port_t:s0 tclass=tcp_socket
Adding this rule:
[root@centos-7 selinux]# cat firefox-1473754.te
module firefox-1473754 1.0;
require {
type xserver_port_t;
type mozilla_plugin_t;
class tcp_socket name_connect;
}
#============= mozilla_plugin_t ==============
#!!!! This avc can be allowed using the boolean 'mozilla_plugin_can_network_connect'
allow mozilla_plugin_t xserver_port_t:tcp_socket name_connect;
Via this command series as root:
1507 Jul 21 12:28 cd selinux
1508 Jul 21 12:28 yum -y install policycoreutils-python policycoreutils
1509 Jul 21 12:29 cat /var/log/audit/audit.log | audit2allow -m firefox-1473754 > firefox-1473754.te
1510 Jul 21 12:30 checkmodule -M -m -o firefox-1473754.mod firefox-1473754.te
1511 Jul 21 12:30 semodule_package -o firefox-1473754.pp -m firefox-1473754.mod
1512 Jul 21 12:30 semodule -i firefox-1473754.pp
Solved the problem with <ctrl-T> and SELinux errors, as well as the matching Mozilla IPC errors
===========
There is a lingering bug in HTML Tidy, which I will take up with author elsewhere
privacy enhanced, isolated firefox invocation
current id: uid=500(herrold) gid=500(herrold) groups=500(herrold),10(wheel),135(mock),498(pulse-access) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
PEFF: ghola
note: ghola is a non-priv'd user on localhost,
which we access via a keyed SSH connection
to try to avoid some content exfiltration by
hostile web browser applications: Flash, etc
THISHOST: centos-7.first.owlriver.net
Command: ssh -X -t -t -l ghola centos-7.first.owlriver.net firefox --no-remote
now down in non-privacy enhanced firefox userid
current id: uid=606(ghola) gid=606(ghola) groups=606(ghola),498(pulse-access) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Command: umask 022 ; /usr/bin/firefox --no-remote --no-remote
console.error:
Tidy Exception:
Message: NS_ERROR_DOM_RETVAL_UNDEFINED: Component returned failure code: 0x805303f5 [nsIChannel.open]
Stack:
TidyBrowser.prototype.getHtmlFromCache@chrome://tidy/content/tidyBrowser.js:720:18
TidyBrowser.prototype.validateDoc@chrome://tidy/content/tidyBrowser.js:926:22
TidyBrowser.prototype.validateCache@chrome://tidy/content/tidyBrowser.js:901:7
onTidyPageLoad@chrome://tidy/content/tidyBrowser.js:161:7
/ Stack:
TidyBrowser.prototype.getHtmlFromCache@chrome://tidy/content/tidyBrowser.js:720:18
TidyBrowser.prototype.validateDoc@chrome://tidy/content/tidyBrowser.js:926:22
TidyBrowser.prototype.validateCache@chrome://tidy/content/tidyBrowser.js:901:7
onTidyPageLoad@chrome://tidy/content/tidyBrowser.js:161:7
Sorry, we don't have a capacity to fix that. Let's move it to selinux guys to investigate. SE-Linux folks I think the addition will look a lot like the fix needed and created for 'bluejeans' mozilla_plugin_use_bluejeans -- Russ herrold Sorry, we don't have a capacity to fix that. |