Bug 1125153 - SELinux is preventing /bin/mv from 'rename' accesses on the chr_file .
Summary: SELinux is preventing /bin/mv from 'rename' accesses on the chr_file .
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:812bc2c93a0594e9ffd30f7149f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-31 08:19 UTC by Yajo
Modified: 2014-08-21 09:46 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-180.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-21 09:46:46 UTC


Attachments (Terms of Use)

Description Yajo 2014-07-31 08:19:18 UTC
Description of problem:
When trying to reproduce bug 1124312 with `setenforce 0`.
SELinux is preventing /bin/mv from 'rename' accesses on the chr_file .

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

If cree que de manera predeterminada, mv debería permitir acceso rename sobre   chr_file.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso momentáneamente executando:
# grep mv /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:svirt_lxc_net_t:s0:c348,c673
Target Context                system_u:object_r:svirt_sandbox_file_t:s0:c348,c67
                              3
Target Objects                 [ chr_file ]
Source                        mv
Source Path                   /bin/mv
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.21-21.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-177.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.15.6-200.fc20.x86_64 #1 SMP Fri
                              Jul 18 02:36:27 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-07-31 09:43:43 CEST
Last Seen                     2014-07-31 09:43:43 CEST
Local ID                      d8927ac2-5883-4ca1-bd92-f7d0685bab5e

Raw Audit Messages
type=AVC msg=audit(1406792623.18:1399): avc:  denied  { rename } for  pid=9394 comm="mv" name="fuse-" dev="tmpfs" ino=856546 scontext=system_u:system_r:svirt_lxc_net_t:s0:c348,c673 tcontext=system_u:object_r:svirt_sandbox_file_t:s0:c348,c673 tclass=chr_file


type=AVC msg=audit(1406792623.18:1399): avc:  denied  { unlink } for  pid=9394 comm="mv" name="fuse" dev="tmpfs" ino=836359 scontext=system_u:system_r:svirt_lxc_net_t:s0:c348,c673 tcontext=system_u:object_r:svirt_sandbox_file_t:s0:c348,c673 tclass=chr_file


type=SYSCALL msg=audit(1406792623.18:1399): arch=x86_64 syscall=rename success=yes exit=0 a0=7fff5a211eae a1=7fff5a211eb4 a2=44 a3=7fff5a210290 items=0 ppid=9077 pid=9394 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=mv exe=/bin/mv subj=system_u:system_r:svirt_lxc_net_t:s0:c348,c673 key=(null)

Hash: mv,svirt_lxc_net_t,svirt_sandbox_file_t,chr_file,rename

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.15.6-200.fc20.x86_64
type:           libreport

Comment 1 Yajo 2014-08-01 07:10:18 UTC
The problem was raised when installing colord.

Comment 2 Daniel Walsh 2014-08-06 21:48:47 UTC
8ad91087584edc49b615aec04c285deae35edb0d

Fixes this in git.  Needs back port to F21/RHEL7.

Comment 3 Lukas Vrabec 2014-08-12 09:23:08 UTC
commit b8ad26c52b2b781a1afd4e18a300d4ed4ad86977
Author: Dan Walsh <dwalsh@redhat.com>
Date:   Wed Aug 6 17:47:41 2014 -0400

    Allow svirt domains to manage chr files and blk files for mknod commands

https://github.com/selinux-policy/selinux-policy/commit/b8ad26c52b2b781a1afd4e18a300d4ed4ad86977

Dan, fix is included in F22/F21/F20 repo and will be also included in RHEL7

Comment 4 Fedora Update System 2014-08-13 12:09:20 UTC
selinux-policy-3.12.1-180.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-180.fc20

Comment 5 Fedora Update System 2014-08-16 00:30:41 UTC
Package selinux-policy-3.12.1-180.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-180.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-9454/selinux-policy-3.12.1-180.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-08-21 09:46:46 UTC
selinux-policy-3.12.1-180.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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