Bug 1278990 - SELinux is preventing /usr/sbin/setfiles from 'read' accesses on the file /etc/tor/torsocks.conf.
Summary: SELinux is preventing /usr/sbin/setfiles from 'read' accesses on the file /et...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:ddbb57717282d671f578f7bccd7...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-06 23:31 UTC by Фукидид
Modified: 2016-07-19 20:56 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 20:56:22 UTC
Type: ---
Embargoed:
fukidid: needinfo-


Attachments (Terms of Use)

Description Фукидид 2015-11-06 23:31:05 UTC
Description of problem:
Updating the system:
$ torify dnf upgrade
SELinux is preventing /usr/sbin/setfiles from 'read' accesses on the file /etc/tor/torsocks.conf.

*****  Plugin catchall (100. confidence) suggests   **************************

If вы считаете, что setfiles следует разрешить доступ read к torsocks.conf file по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
Do
чтобы разрешить доступ, выполните:
# grep restorecon /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c102
                              3
Target Context                system_u:object_r:tor_etc_t:s0
Target Objects                /etc/tor/torsocks.conf [ file ]
Source                        restorecon
Source Path                   /usr/sbin/setfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           policycoreutils-2.3-18.fc22.x86_64
Target RPM Packages           torsocks-2.1.0-1.fc22.x86_64
Policy RPM                    selinux-policy-3.13.1-128.16.fc22.noarch selinux-
                              policy-3.13.1-128.18.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.3-200.fc22.x86_64 #1 SMP Thu
                              Oct 8 03:23:55 UTC 2015 x86_64 x86_64
Alert Count                   3
First Seen                    2015-11-07 02:27:04 MSK
Last Seen                     2015-11-07 02:27:08 MSK
Local ID                      c2f16d84-f86b-4df3-91da-87f8f5cc36f1

Raw Audit Messages
type=AVC msg=audit(1446852428.287:562): avc:  denied  { read } for  pid=27409 comm="restorecon" name="torsocks.conf" dev="dm-2" ino=788434 scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tor_etc_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1446852428.287:562): arch=x86_64 syscall=open success=no exit=EACCES a0=7f925b7d0e5b a1=0 a2=1b6 a3=ac items=0 ppid=26789 pid=27409 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=1 comm=restorecon exe=/usr/sbin/setfiles subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null)

Hash: restorecon,setfiles_t,tor_etc_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-128.16.fc22.noarch
selinux-policy-3.13.1-128.18.fc22.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.3-200.fc22.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2015-11-11 08:18:13 UTC
Does it happen only with torify? I am not able to reproduce it.

Comment 2 Daniel Walsh 2015-11-14 11:55:03 UTC
Leaked file descriptor.

Comment 3 Miroslav Grepl 2015-11-20 12:47:48 UTC
Yes but I would like to know if torify leaks fds.

Comment 4 Fedora End Of Life 2016-07-19 20:56:22 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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.