Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1392187 - Tor onion service are broken by selinux
Tor onion service are broken by selinux
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
24
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-05 16:07 EDT by Michael Scherer
Modified: 2017-08-08 15:09 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 15:09:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Scherer 2016-11-05 16:07:21 EDT
Description of problem:
See https://bugzilla.redhat.com/show_bug.cgi?id=1375369

When using onion services (also called hidden service, when you use tor to provides a service in the tor network), tor will use dac_read_search and dac_override on a few directory (usually, in /var/lib/tor itself).

This is currently blocked by the policy.


Version-Release number of selected component (if applicable):
# rpm -q selinux-policy-targeted
selinux-policy-targeted-3.13.1-191.20.fc24.noarch

It was broken before too, cf the bug report at the start.

How reproducible:
Each time

Steps to Reproduce:
1. Install tor 
2. Add the fiollowing to the config (in /etc/tor/torrc )

HiddenServiceDir /var/lib/tor/hidden_service_ssh
HiddenServicePort 22 127.0.0.1:22

3. try to start tor

Actual results:

tor fail

Expected results:

tor start 

Additional info:

in audit.log, there is:

type=AVC msg=audit(1478375884.996:438): avc:  denied  { dac_override } for  pid=971 comm="tor" capability=1  scontext=system_u:system_r:tor_t:s0 tcontext=system_u:system_r:tor_t:s0 tclass=capability permissive=0
type=AVC msg=audit(1478375884.996:439): avc:  denied  { dac_read_search } for  pid=971 comm="tor" capability=2  scontext=system_u:system_r:tor_t:s0 tcontext=system_u:system_r:tor_t:s0 tclass=capability permissive=0
Comment 1 Michael Scherer 2016-11-05 16:15:49 EDT
Also, I would propose either a boolean:

https://github.com/fedora-selinux/selinux-policy/pull/169

or directly grant that right. I proposed a boolean since we try to get ride of dac_override, cf https://mgrepl.wordpress.com/2015/05/26/are-you-getting-dac_override-avc-message/ so I am not sure of the impact there.
Comment 2 Gwyn Ciesla 2016-12-15 08:49:27 EST
Still not working on selinux-policy-targeted-3.13.1-225.3.fc25
Comment 3 Gwyn Ciesla 2017-01-25 08:57:03 EST
Still not working on selinux-policy-targeted-3.13.1-225.6.fc25
Comment 4 Gwyn Ciesla 2017-02-02 11:56:06 EST
Just for completeness, tor onion services work beautifully with tor in permissive mode.
Comment 5 Fedora End Of Life 2017-07-25 19:46:58 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 6 Kyle Marek 2017-07-26 03:38:58 EDT
Not that it matters with Fedora 24 going EOL, but this is a duplicate of: https://bugzilla.redhat.com/show_bug.cgi?id=1375369
Comment 7 Gwyn Ciesla 2017-07-26 08:37:08 EDT
Fixed in f25+

https://bugzilla.redhat.com/show_bug.cgi?id=1375369#c32
Comment 8 Fedora End Of Life 2017-08-08 15:09:09 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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