Bug 614922 - SELinux is preventing /usr/bin/file "getattr" access on /usr/lib/games.
Summary: SELinux is preventing /usr/bin/file "getattr" access on /usr/lib/games.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:57866acd88e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-15 14:56 UTC by Daniel Stripes
Modified: 2010-08-10 21:41 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.7.19-44.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-10 21:41:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Daniel Stripes 2010-07-15 14:56:44 UTC
Summary:

SELinux is preventing /usr/bin/file "getattr" access on /usr/lib/games.

Detailed Description:

[file has a permissive type (boinc_t). This access was not denied.]

SELinux denied access requested by file. It is not expected that this access is
required by file and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                unconfined_u:system_r:boinc_t:s0
Target Context                system_u:object_r:games_exec_t:s0
Target Objects                /usr/lib/games [ dir ]
Source                        file
Source Path                   /usr/bin/file
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           file-5.04-5.fc13
Target RPM Packages           filesystem-2.4.31-1.fc13
Policy RPM                    selinux-policy-3.7.19-33.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.6-147.fc13.x86_64
                              #1 SMP Tue Jul 6 22:32:17 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 15 Jul 2010 10:55:21 AM EDT
Last Seen                     Thu 15 Jul 2010 10:55:21 AM EDT
Local ID                      4d39e8cf-8609-4a3b-af62-07e24b918675
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1279205721.558:29961): avc:  denied  { getattr } for  pid=3045 comm="file" path="/usr/lib/games" dev=dm-0 ino=319489 scontext=unconfined_u:system_r:boinc_t:s0 tcontext=system_u:object_r:games_exec_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1279205721.558:29961): arch=c000003e syscall=4 success=yes exit=0 a0=7fffd0efdf34 a1=7fffd0efbc90 a2=7fffd0efbc90 a3=7fffd0ef5920 items=0 ppid=2995 pid=3045 auid=500 uid=490 gid=477 euid=490 suid=490 fsuid=490 egid=477 sgid=477 fsgid=477 tty=(none) ses=2 comm="file" exe="/usr/bin/file" subj=unconfined_u:system_r:boinc_t:s0 key=(null)



Hash String generated from  catchall,file,boinc_t,games_exec_t,dir,getattr
audit2allow suggests:

#============= boinc_t ==============
allow boinc_t games_exec_t:dir getattr;

Comment 1 Daniel Walsh 2010-07-15 17:05:44 UTC
is /usr/lib/games a mountpoint?

Comment 2 Daniel Stripes 2010-07-15 17:51:46 UTC
I don't see it in the outputs of '$ cat /etc/fstab' or '$ mount'.  If I should be looking elsewhere, please point me in the right direction.  Thanks.

Comment 3 Daniel Walsh 2010-07-15 18:36:33 UTC
Ok.  Were you in the /usr/lib/games directory when you restarted boinc or did a yum update?

Does boinc have any relationship to /var/lib/games?

Comment 4 Daniel Stripes 2010-07-16 05:20:25 UTC
No, and no.

I know of no relationship between BOINC and /var/lib/games.  I have three (3) very similar hardware platforms here (same CPU, mobo, RAM type, video cards), all running f13 and yum updated at about the same time running BOINC, and only one (1) of the three (3) is throwing up this denial.

I did do <$ su -c '/sbin/fixfiles onboot restore'> on that particular machine before noting this denial, but I also did it on one (1) of the other two (2) machines ... and was not in /var/lib/games on either machine.

Comment 5 Daniel Walsh 2010-07-19 15:35:57 UTC
Is it happening repeatedly or just this once?

Comment 6 Daniel Stripes 2010-07-20 00:21:56 UTC
(In reply to comment #5)
> Is it happening repeatedly or just this once?    

Repeatedly; I just restarted this system to check and observed:

Summary:

SELinux is preventing /usr/bin/file "getattr" access on /usr/lib/games.

Detailed Description:

[file has a permissive type (boinc_t). This access was not denied.]

SELinux denied access requested by file. It is not expected that this access is
required by file and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                unconfined_u:system_r:boinc_t:s0
Target Context                system_u:object_r:games_exec_t:s0
Target Objects                /usr/lib/games [ dir ]
Source                        file
Source Path                   /usr/bin/file
Port                          <Unknown>
Host                          antares.milky.way
Source RPM Packages           file-5.04-5.fc13
Target RPM Packages           filesystem-2.4.31-1.fc13
Policy RPM                    selinux-policy-3.7.19-33.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     antares.milky.way
Platform                      Linux antares.milky.way 2.6.33.6-147.fc13.x86_64
                              #1 SMP Tue Jul 6 22:32:17 UTC 2010 x86_64 x86_64
Alert Count                   5
First Seen                    Thu 15 Jul 2010 10:55:21 AM EDT
Last Seen                     Mon 19 Jul 2010 08:11:41 PM EDT
Local ID                      4d39e8cf-8609-4a3b-af62-07e24b918675
Line Numbers                  

Raw Audit Messages            

node=antares.milky.way type=AVC msg=audit(1279584701.24:30472): avc:  denied  { getattr } for  pid=2512 comm="file" path="/usr/lib/games" dev=dm-0 ino=319489 scontext=unconfined_u:system_r:boinc_t:s0 tcontext=system_u:object_r:games_exec_t:s0 tclass=dir

node=antares.milky.way type=SYSCALL msg=audit(1279584701.24:30472): arch=c000003e syscall=4 success=yes exit=0 a0=7fff23ba6f34 a1=7fff23ba6660 a2=7fff23ba6660 a3=40021 items=0 ppid=2462 pid=2512 auid=500 uid=490 gid=477 euid=490 suid=490 fsuid=490 egid=477 sgid=477 fsgid=477 tty=(none) ses=1 comm="file" exe="/usr/bin/file" subj=unconfined_u:system_r:boinc_t:s0 key=(null)

--  
I also observed a similar repeatedly occurring avc denial (SELinux is preventing /usr/bin/file "getattr" access on /lib/modules.)([file has a permissive type (boinc_t). This access was not denied.]) on /lib/modules.  Possibly the same root cause?

Comment 7 Daniel Walsh 2010-07-20 13:42:21 UTC
It looks like boinc is executing the file command on some directories.


Miroslav do you have any ideas?

Comment 8 Miroslav Grepl 2010-07-26 11:59:29 UTC
I am looking into code and now it's clear. They use the file command to check installation of 32 bit libraries or executables in the following directories

const char *libdir[]={"/lib","/lib32","/lib/32","/usr/lib","/usr/lib32","/usr/lib/32"};

Comment 9 Miroslav Grepl 2010-07-28 06:15:41 UTC
Fixed in selinux-policy-3.7.19-42.fc13.

Comment 10 Fedora Update System 2010-08-06 13:41:39 UTC
selinux-policy-3.7.19-44.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-44.fc13

Comment 11 Fedora Update System 2010-08-06 21:00:13 UTC
selinux-policy-3.7.19-44.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-44.fc13

Comment 12 Fedora Update System 2010-08-10 21:40:04 UTC
selinux-policy-3.7.19-44.fc13 has been pushed to the Fedora 13 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.