Bug 640149 - SELinux is preventing /usr/bin/updatedb from 'getattr' accesses on the directory /usr/share/sagator.
Summary: SELinux is preventing /usr/bin/updatedb from 'getattr' accesses on the direct...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: sagator
Version: 15
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan ONDREJ
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:d7fb2181846...
: 799377 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-05 01:37 UTC by Martin Tack
Modified: 2012-08-07 19:38 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-08-07 19:38:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Martin Tack 2010-10-05 01:37:42 UTC
Samenvatting:

SELinux belet /usr/bin/updatedb "getattr" toegang on /usr/share/sagator.

Gedetailleerde omschrijving:

SELinux belette toegang gevraagd door updatedb. Het wordt niet verwacht dat deze
toegang voor updatedb nodig is en deze toegang kan een indringing poging
aangeven. Het is ook mogelijk dat de specifieke versie of configuratie van de
toepassing het veroorzaakt om extra toegang aan te vragen.

Toegang toestaan:

Je kunt een locale tactiek module maken om deze toegang toe te staan - zie FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Dien a.u.b. een fout
rapport in.

Extra informatie:

Bron context                  system_u:system_r:locate_t:s0-s0:c0.c1023
Doel context                  system_u:object_r:sagator_t:s0
Doel objecten                 /usr/share/sagator [ dir ]
Bron                          updatedb
Bron pad                      /usr/bin/updatedb
Poort                         <Onbekend>
Host                          (verwijderd)
Bron RPM pakketten            mlocate-0.22.4-1.fc13
Doel RPM pakketten            sagator-core-1.2.0-1.fc13
Tactiek RPM                   selinux-policy-3.7.19-62.fc13
SELinux aangezet              True
Tactiek type                  targeted
Afdwingende mode              Enforcing
Plug-in naam                  catchall
Host naam                     (verwijderd)
Platform                      Linux (verwijderd) 2.6.34.7-56.fc13.x86_64 #1 SMP
                              Wed Sep 15 03:36:55 UTC 2010 x86_64 x86_64
Aantal waarschuwingen         2
Eerst gezien op               ma 04 okt 2010 03:30:20 CEST
Laatst gezien op              di 05 okt 2010 03:30:19 CEST
Locale ID                     bbc40cb1-2028-4832-a532-e993d97aab9c
Regel nummers                 

Onbewerkte audit boodschappen 

node=(verwijderd) type=AVC msg=audit(1286242219.695:23639): avc:  denied  { getattr } for  pid=7141 comm="updatedb" path="/usr/share/sagator" dev=sda2 ino=107295 scontext=system_u:system_r:locate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sagator_t:s0 tclass=dir

node=(verwijderd) type=SYSCALL msg=audit(1286242219.695:23639): arch=c000003e syscall=6 success=no exit=-13 a0=20c66c9 a1=7fff9fe587f0 a2=7fff9fe587f0 a3=6d65722d65657266 items=0 ppid=7135 pid=7141 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=80 comm="updatedb" exe="/usr/bin/updatedb" subj=system_u:system_r:locate_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,updatedb,locate_t,sagator_t,dir,getattr
audit2allow suggests:

#============= locate_t ==============
allow locate_t sagator_t:dir getattr;

Comment 1 Martin Tack 2010-10-05 01:57:06 UTC
I think the avc occurs each time cron daily runs mlocate .

Will keep an eye on it .

If more info is needed ,please ask . 

Martin

Comment 2 Daniel Walsh 2010-10-05 12:52:39 UTC
This probably means sagator_t is not defined as a file_type(sagator_t).  If this is a domain type then the policy you wrote is wrong.

Please work with us to write policy correctly.  You should submit your policy for review at refpolicy.com

Comment 3 Daniel Walsh 2010-10-05 12:57:27 UTC
Definitely remove

/usr/share/sagator.*		gen_context(system_u:object_r:sagator_t,s0)

Remove locate_t from your policy
I would not create types for sagator_bin_t and sagator_lib_t just label those files as lib_t and bin_t

Comment 4 Jan ONDREJ 2010-10-05 13:08:44 UTC
Sagator's main feature is to run itself in chroot. In chroot I have to run sagator as sagator_t and can't use default contexts. Is this right?
Removal of /usr/share/sagator.* from it's file context will fail to run it in chroot.

Comment 5 Daniel Walsh 2010-10-05 13:19:03 UTC
No, segator_t is a label of a process you can not put this label on a file.  It is against the rules.  /usr/share/segator* will be labelled usr_t and  you can allow segator to read usr_t.

Comment 6 Bug Zapper 2011-05-31 11:59:02 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  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 '13'.

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 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Jan ONDREJ 2011-05-31 12:03:32 UTC
Martin, can you confirm, that this is still a problem with sagator-1.2.3?
If yes, please change Fedora release in this but to 15. There was no time to test this bug, even if some changes have been done in sagator's selinux policy package.

Comment 8 Jan ONDREJ 2012-03-22 07:19:50 UTC
*** Bug 799377 has been marked as a duplicate of this bug. ***

Comment 9 Fedora End Of Life 2012-08-07 19:38:19 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

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

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached 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 to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

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.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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