Bug 1392187 - Tor onion service are broken by selinux
Summary: Tor onion service are broken by selinux
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 24
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2016-11-05 20:07 UTC by Michael S.
Modified: 2017-08-08 19:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-08-08 19:09:09 UTC
Type: Bug

Attachments (Terms of Use)

Description Michael S. 2016-11-05 20:07:21 UTC
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

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

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 S. 2016-11-05 20:15:49 UTC
Also, I would propose either a boolean:


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 13:49:27 UTC
Still not working on selinux-policy-targeted-3.13.1-225.3.fc25

Comment 3 Gwyn Ciesla 2017-01-25 13:57:03 UTC
Still not working on selinux-policy-targeted-3.13.1-225.6.fc25

Comment 4 Gwyn Ciesla 2017-02-02 16:56:06 UTC
Just for completeness, tor onion services work beautifully with tor in permissive mode.

Comment 5 Fedora End Of Life 2017-07-25 23:46:58 UTC
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 07:38:58 UTC
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 12:37:08 UTC
Fixed in f25+


Comment 8 Fedora End Of Life 2017-08-08 19:09:09 UTC
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

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.