Bug 976950 - SELinux is preventing /usr/bin/cp from 'write' accesses on the directory extra.
Summary: SELinux is preventing /usr/bin/cp from 'write' accesses on the directory extra.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b53d54ed0173236e46c2c39f9df...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-22 02:52 UTC by Moez Roy
Modified: 2014-02-05 21:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-05 21:54:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Moez Roy 2013-06-22 02:52:52 UTC
Description of problem:
SELinux is preventing /usr/bin/cp from 'write' accesses on the directory extra.

*****  Plugin kernel_modules (91.4 confidence) suggests  *********************

If you do not think cp should try write access on extra.
Then you may be under attack by a hacker, since confined applications should not need this access.
Do
contact your security administrator and report this issue.

*****  Plugin catchall (9.59 confidence) suggests  ***************************

If you believe that cp should be allowed write access on the extra directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep cp /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:initrc_t:s0
Target Context                system_u:object_r:modules_object_t:s0
Target Objects                extra [ dir ]
Source                        cp
Source Path                   /usr/bin/cp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.17-8.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.6-200.fc18.x86_64 #1 SMP Thu
                              Jun 13 18:56:55 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-06-21 19:51:10 PDT
Last Seen                     2013-06-21 19:51:10 PDT
Local ID                      1764a75a-be3b-4615-90b4-1092044e9a5b

Raw Audit Messages
type=AVC msg=audit(1371869470.321:419): avc:  denied  { write } for  pid=6740 comm="cp" name="extra" dev="dm-2" ino=1714187 scontext=unconfined_u:system_r:initrc_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir


type=AVC msg=audit(1371869470.321:419): avc:  denied  { add_name } for  pid=6740 comm="cp" name="vboxdrv.ko" scontext=unconfined_u:system_r:initrc_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir


type=AVC msg=audit(1371869470.321:419): avc:  denied  { create } for  pid=6740 comm="cp" name="vboxdrv.ko" scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:object_r:modules_object_t:s0 tclass=file


type=AVC msg=audit(1371869470.321:419): avc:  denied  { write } for  pid=6740 comm="cp" path="/usr/lib/modules/3.9.6-200.fc18.x86_64/extra/vboxdrv.ko" dev="dm-2" ino=1709202 scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:object_r:modules_object_t:s0 tclass=file


type=SYSCALL msg=audit(1371869470.321:419): arch=x86_64 syscall=open success=yes exit=EINTR a0=7fff2c38c732 a1=c1 a2=1a4 a3=2 items=0 ppid=6660 pid=6740 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=2 tty=pts0 comm=cp exe=/usr/bin/cp subj=unconfined_u:system_r:initrc_t:s0 key=(null)

Hash: cp,initrc_t,modules_object_t,dir,write

audit2allow

#============= initrc_t ==============
allow initrc_t modules_object_t:dir { write add_name };
allow initrc_t modules_object_t:file { write create };

audit2allow -R
require {
	type initrc_t;
}

#============= initrc_t ==============
files_manage_kernel_modules(initrc_t)
modules_filetrans_named_content(initrc_t)


Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.6-200.fc18.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-06-22 10:53:47 UTC
vbox init script?

Comment 2 Moez Roy 2013-10-03 03:04:58 UTC
(In reply to Daniel Walsh from comment #1)
> vbox init script?

what is that?

Comment 3 Daniel Walsh 2013-10-04 15:05:14 UTC
This looks like you disabled the unconfined module and are running some kind of vbox init script under /etc/rc.d/, which is causing these AVCs.

We really do  not want to allow init scripts to overwrite kernel modules if unconfined module is disabled.

Comment 4 Miroslav Grepl 2013-10-10 14:20:23 UTC
I think we have a bug for this issue. Moving to Lukas to add a new domain to avoid initrc_t/init_t.

Comment 5 Fedora End Of Life 2013-12-21 14:06:08 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 WONTFIX if it remains open with a Fedora 
'version' of '18'.

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 prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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 to Fedora 18's end of life.

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 Fedora End Of Life 2014-02-05 21:54:57 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 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.