Bug 461560 - SELinux is preventing the nm-system-setti from using potentially mislabeled files (./tmp).
SELinux is preventing the nm-system-setti from using potentially mislabeled f...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
: Reopened, SELinux
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-09 00:53 EDT by Matěj Cepl
Modified: 2009-06-10 07:15 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-10 07:15:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/audit/audit.log (2.39 MB, text/plain)
2008-09-09 00:56 EDT, Matěj Cepl
no flags Details

  None (edit)
Description Matěj Cepl 2008-09-09 00:53:01 EDT
SELinux has denied nm-system-setti access to potentially mislabeled file(s)
(./tmp). This means that SELinux will not allow nm-system-setti to use these
files. It is common for users to edit files in their home directory or tmp
directories and then move (mv) them to system directories. The problem is that
the files end up with the wrong file context which confined applications are not
allowed to access.

Povolení přístupu:

If you want nm-system-setti to access this files, you need to relabel them using
restorecon -v './tmp'. You might want to relabel the entire directory using
restorecon -R -v './tmp'.

Další informace:

Kontext zdroje                system_u:system_r:NetworkManager_t:SystemLow-
                              SystemHigh
Kontext cíle                 system_u:object_r:tmp_t
Objekty cíle                 ./tmp [ dir ]
Zdroj                         nm-system-setti
Cesta zdroje                  /usr/sbin/nm-system-settings
Port                          <Neznámé>
Počítač                    viklef
RPM balíčky zdroje          NetworkManager-0.7.0-0.11.svn4022.fc9
RPM balíčky cíle           filesystem-2.4.13-1.fc9
RPM politiky                  selinux-policy-3.3.1-87.fc9
Selinux povolen               True
Typ politiky                  targeted
MLS povoleno                  True
Vynucovací režim            Enforcing
Název zásuvného modulu     home_tmp_bad_labels
Název počítače            viklef
Platforma                     Linux viklef 2.6.26.3-29.fc9.i686 #1 SMP Wed Sep 3
                              03:42:27 EDT 2008 i686 i686
Počet upozornění           6
Poprvé viděno               Po 8. září 2008, 19:25:04 CEST
Naposledy viděno             Út 9. září 2008, 06:44:44 CEST
Místní ID                   b05ce350-5474-44a2-9105-c7a20f1ef529
Čísla řádků              

Původní zprávy auditu      

host=viklef type=AVC msg=audit(1220935484.546:1563): avc:  denied  { read } for  pid=31094 comm="nm-system-setti" name="tmp" dev=dm-0 ino=1274212 scontext=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tmp_t:s0 tclass=dir

host=viklef type=SYSCALL msg=audit(1220935484.546:1563): arch=40000003 syscall=5 success=no exit=-13 a0=3ade16 a1=0 a2=1b6 a3=0 items=0 ppid=1 pid=31094 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nm-system-setti" exe="/usr/sbin/nm-system-settings" subj=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 key=(null)
Comment 1 Matěj Cepl 2008-09-09 00:54:20 EDT
and one more:


Souhrn:

SELinux is preventing the nm-system-setti from using potentially mislabeled
files (/).

Podrobný popis:

SELinux has denied nm-system-setti access to potentially mislabeled file(s) (/).
This means that SELinux will not allow nm-system-setti to use these files. It is
common for users to edit files in their home directory or tmp directories and
then move (mv) them to system directories. The problem is that the files end up
with the wrong file context which confined applications are not allowed to
access.

Povolení přístupu:

If you want nm-system-setti to access this files, you need to relabel them using
restorecon -v '/'. You might want to relabel the entire directory using
restorecon -R -v '/'.

Další informace:

Kontext zdroje                system_u:system_r:NetworkManager_t:SystemLow-
                              SystemHigh
Kontext cíle                 system_u:object_r:tmp_t
Objekty cíle                 / [ dir ]
Zdroj                         nm-system-setti
Cesta zdroje                  /usr/sbin/nm-system-settings
Port                          <Neznámé>
Počítač                    viklef
RPM balíčky zdroje          NetworkManager-0.7.0-0.11.svn4022.fc9
RPM balíčky cíle           filesystem-2.4.13-1.fc9
RPM politiky                  selinux-policy-3.3.1-87.fc9
Selinux povolen               True
Typ politiky                  targeted
MLS povoleno                  True
Vynucovací režim            Enforcing
Název zásuvného modulu     home_tmp_bad_labels
Název počítače            viklef
Platforma                     Linux viklef 2.6.26.3-29.fc9.i686 #1 SMP Wed Sep 3
                              03:42:27 EDT 2008 i686 i686
Počet upozornění           3
Poprvé viděno               Po 8. září 2008, 19:25:04 CEST
Naposledy viděno             Út 9. září 2008, 06:44:44 CEST
Místní ID                   dc49e537-bfc7-4bcb-b95a-e96addbc932a
Čísla řádků              

Původní zprávy auditu      

host=viklef type=AVC msg=audit(1220935484.545:1561): avc:  denied  { read } for  pid=31094 comm="nm-system-setti" name="/" dev=tmpfs ino=7041 scontext=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tmp_t:s0 tclass=dir

host=viklef type=SYSCALL msg=audit(1220935484.545:1561): arch=40000003 syscall=5 success=no exit=-13 a0=3ade11 a1=0 a2=1b6 a3=0 items=0 ppid=1 pid=31094 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nm-system-setti" exe="/usr/sbin/nm-system-settings" subj=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 key=(null)
Comment 2 Matěj Cepl 2008-09-09 00:56:31 EDT
Created attachment 316144 [details]
/var/log/audit/audit.log

This computer was relabeled on the last reboot.
Comment 3 Daniel Walsh 2008-09-09 08:37:11 EDT
It is up to the user to correct all permissions labels on files that they move into the system to be used by daemons, this includes Ownership, Permissions and SELinux Label.
Comment 4 Matěj Cepl 2008-09-15 04:07:23 EDT
After relabelling and couple of reboots (so I don't think labels should be the problem), I still get this from audit2allow:

[root@viklef ~]# cat nmSystemSettings.te

module nmSystemSettings 1.0;

require {
        type NetworkManager_t;
        type tmp_t;
        class process setsched;
        class dir read;
}
require {
        type NetworkManager_t;
        type tmp_t;
        class process setsched;
        class dir read;
}

#============= NetworkManager_t ==============
allow NetworkManager_t self:process setsched;
allow NetworkManager_t tmp_t:dir read;
[root@viklef ~]#
Comment 5 Daniel Walsh 2008-09-15 12:47:12 EDT
Fixed in selinux-policy-3.3.1-90.fc9
Comment 6 Matěj Cepl 2008-10-19 18:49:18 EDT
yeah, gone
Comment 7 Bug Zapper 2009-06-09 22:40:31 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  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 '9'.

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 9'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 9 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

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