Bug 797450 - SELinux is preventing /usr/sbin/NetworkManager from 'read' accesses on the None sessions.
Summary: SELinux is preventing /usr/sbin/NetworkManager from 'read' accesses on the No...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:dacad3fbd28ac8a8155e0582287...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-25 23:04 UTC by Dan Mashal
Modified: 2012-02-29 11:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-29 11:32:42 UTC
Type: ---


Attachments (Terms of Use)

Description Dan Mashal 2012-02-25 23:04:03 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.0-0.rc3.git7.2.fc17.x86_64
reason:         SELinux is preventing /usr/sbin/NetworkManager from 'read' accesses on the None sessions.
time:           Sat 25 Feb 2012 03:03:34 PM PST

description:
:SELinux is preventing /usr/sbin/NetworkManager from 'read' accesses on the None sessions.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that NetworkManager should be allowed read access on the sessions <Unknown> 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 NetworkManager /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:NetworkManager_t:s0
:Target Context                system_u:object_r:systemd_logind_sessions_t:s0
:Target Objects                sessions [ None ]
:Source                        NetworkManager
:Source Path                   /usr/sbin/NetworkManager
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           NetworkManager-0.9.3-0.2.git20120215.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-89.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.0-0.rc3.git7.2.fc17.x86_64 #1
:                              SMP Fri Feb 17 18:55:53 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Sat 25 Feb 2012 10:38:38 PM PST
:Last Seen                     Sat 25 Feb 2012 10:38:38 PM PST
:Local ID                      de5134f3-d03a-48fc-8fd3-06b88fae9d15
:
:Raw Audit Messages
:type=AVC msg=audit(1330238318.105:32): avc:  denied  { read } for  pid=454 comm="NetworkManager" name="sessions" dev="tmpfs" ino=10632 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:systemd_logind_sessions_t:s0 tclass=dirnode=(removed) type=SYSCALL msg=audit(1330238318.105:32): arch=c000003e syscall=254 success=no exit=-13 a0=b a1=7fa8fd4a7cda a2=280 a3=7fffccbb2b10 items=0 ppid=1 pid=454 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="NetworkManager" exe="/usr/sbin/NetworkManager" subj=system_u:system_r:NetworkManager_t:s0 key=(null)
:
:
:Hash: NetworkManager,NetworkManager_t,systemd_logind_sessions_t,None,read
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Miroslav Grepl 2012-02-27 09:53:44 UTC
Please execute in your terminal

$ yum update selinux-policy-targeted --enablerepo=updates-testing

Comment 2 Dan Mashal 2012-02-27 17:52:58 UTC
[root@Fedora17 ~]# yum update selinux-policy-targeted --enablerepo=updates-testing
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Update Process
No Packages marked for Update
[root@Fedora17 ~]# yum clean
Loaded plugins: langpacks, presto, refresh-packagekit
Error: clean requires an option: headers, packages, metadata, dbcache, plugins, expire-cache, rpmdb, all
[root@Fedora17 ~]# yum clean all
Loaded plugins: langpacks, presto, refresh-packagekit
Cleaning repos: fedora google-chrome updates updates-testing
Cleaning up Everything
No delta-package files removed by presto
[root@Fedora17 ~]# yum update
Loaded plugins: langpacks, presto, refresh-packagekit
fedora/metalink                                          |  12 kB     00:00     
fedora                                                   | 4.2 kB     00:00     
fedora/primary_db                                        |  14 MB     00:06     
fedora/group_gz                                          | 425 kB     00:02     
google-chrome                                            |  951 B     00:00     
google-chrome/primary                                    | 1.4 kB     00:00     
updates/metalink                                         |  18 kB     00:00     
updates                                                  | 2.6 kB     00:00     
updates/primary_db                                       | 1.2 kB     00:00     
updates-testing/metalink                                 |  13 kB     00:00     
updates-testing                                          | 4.5 kB     00:00     
http://mirror.us.as6453.net/fedora/linux/updates/testing/17/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for updates-testing
Trying other mirror.
updates-testing                                          | 4.5 kB     00:00     
updates-testing/primary_db                               | 1.3 MB     00:05     
updates-testing/group_gz                                 | 425 kB     00:00     
google-chrome                                                               3/3
Setting up Update Process
No Packages marked for Update
[root@Fedora17 ~]#

Comment 3 Dan Mashal 2012-02-27 17:56:45 UTC
After that i ran the following to fix the yum problem:

[root@Fedora17 ~]# rm -f /var/lib/rpm/__db*
[root@Fedora17 ~]# rpm --rebuilddb
[root@Fedora17 ~]# yum update
Loaded plugins: langpacks, presto, refresh-packagekit
fedora/metalink                                          |  12 kB     00:00     
fedora                                                   | 4.2 kB     00:00     
fedora/primary_db                                        |  14 MB     00:17     
fedora/group_gz                                          | 425 kB     00:01     
google-chrome                                            |  951 B     00:00     
google-chrome/primary                                    | 1.4 kB     00:00     
updates/metalink                                         |  18 kB     00:00     
updates                                                  | 2.6 kB     00:00     
updates/primary_db                                       | 1.2 kB     00:00     
updates-testing/metalink                                 |  13 kB     00:00     
updates-testing                                          | 4.5 kB     00:00     
updates-testing/primary_db                               | 1.3 MB     00:04     
updates-testing/group_gz                                 | 425 kB     00:02     
google-chrome                                                               3/3
Setting up Update Process
No Packages marked for Update
[root@Fedora17 ~]# 


Is there any way you could build this functionality in to yum so it automatically does ths?

Comment 4 Miroslav Grepl 2012-02-29 11:32:42 UTC
I have typo. 

$ yum update selinux-policy-targeted


>Is there any way you could build this functionality in to yum so it
>automatically does ths?

You mean if hyou ave corrupted database. I don't think this is a good idea. Anyways this is a question for rpm folks.


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