Bug 595219 - SELinux is preventing hald-addon-ipw- "write" access on /usr/libexec.
Summary: SELinux is preventing hald-addon-ipw- "write" access on /usr/libexec.
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: hal
Version: 12
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:105d1a56666...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-24 06:01 UTC by Jan Hutař
Modified: 2010-11-04 08:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-04 08:31:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2010-05-24 06:01:39 UTC
Summary:

SELinux is preventing hald-addon-ipw- "write" access on /usr/libexec.

Detailed Description:

SELinux denied access requested by hald-addon-ipw-. It is not expected that this
access is required by hald-addon-ipw- 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                system_u:system_r:hald_t:s0
Target Context                system_u:object_r:bin_t:s0
Target Objects                /usr/libexec [ dir ]
Source                        hald-addon-ipw-
Source Path                   hald-addon-ipw-
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           filesystem-2.4.30-2.fc12
Policy RPM                    selinux-policy-3.6.32-114.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.32.12-115.fc12.x86_64 #1 SMP Fri Apr 30
                              19:46:25 UTC 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Sun 23 May 2010 07:32:13 AM CEST
Last Seen                     Mon 24 May 2010 07:37:12 AM CEST
Local ID                      78436cd7-1082-49be-a11d-94df9fcce4be
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1274679432.378:7): avc:  denied  { write } for  pid=1467 comm="hald-addon-ipw-" name="libexec" dev=dm-2 ino=48966 scontext=system_u:system_r:hald_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=dir



Hash String generated from  catchall,hald-addon-ipw-,hald_t,bin_t,dir,write
audit2allow suggests:

#============= hald_t ==============
#!!!! The source type 'hald_t' can write to a 'dir' of the following types:
# virt_image_type, cardmgr_var_run_t, sysctl_vm_t, hald_log_t, device_t, fusefs_t, dosfs_t, var_run_t, var_log_t, hald_cache_t, hald_tmp_t, hald_var_lib_t, hald_var_run_t, var_lock_t, mnt_t, root_t, tmp_t, root_t

allow hald_t bin_t:dir write;

Comment 1 Jan Hutař 2010-05-24 06:03:02 UTC
Hello, this happens each time after the login (to Gnome, using gdm).

Comment 2 Daniel Walsh 2010-05-24 15:43:31 UTC
hald is probably trying to write to /usr/libexec directory because there is a python module there that is not compiled.

Take a look for python programs in /usr/libexec/  And see if you have the corrosponding pyc file.

If you run python directly on the files it should create the compiled version.

Comment 3 Jan Hutař 2010-05-25 10:58:54 UTC
It looks like there is no such a module from what I see:

$ find /usr/libexec/ | while read i; do file $i; done | grep -i ': python' | sort
/usr/libexec/deskbar-applet/modules-2.20-compatible/beagle-live.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/beagle-live.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/beagle-static.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/beagle-static.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/calculator.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/calculator.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/desklicious.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/desklicious.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/epiphany.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/epiphany.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/evolution.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/evolution.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/fedorabz.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/fedorabz.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/files.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/files.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/gdmactions.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/gdmactions.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/googlecodesearch.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/googlecodesearch.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/googlesearch.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/googlesearch.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/history.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/history.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/iswitch-window.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/iswitch-window.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/mozilla.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/mozilla.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/opensearch.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/opensearch.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/programs.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/programs.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/recent.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/recent.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/templates.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/templates.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/tomboy.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/tomboy.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/twitter.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/twitter.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/web_address.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/web_address.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/wikipedia-suggest.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/wikipedia-suggest.pyo: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/yahoo.pyc: python 2.6 byte-compiled
/usr/libexec/deskbar-applet/modules-2.20-compatible/yahoo.pyo: python 2.6 byte-compiled
/usr/libexec/gnome-panel-add: python script text executable
/usr/libexec/rhts/rhts-mk-generate-specfile: python script text executable
/usr/libexec/rhts/rhts-mk-test-import: python script text executable
/usr/libexec/telepathy-butterfly: python script text executable

Or does something from this look suspicious to you?

Thanks,
Jan

Comment 4 Daniel Walsh 2010-05-25 14:43:29 UTC
execute 

python /usr/libexec/gnome-panel-add
python /usr/libexec/rhts/rhts-mk-generate-specfile
python /usr/libexec/rhts/rhts-mk-test-import
python /usr/libexec/telepathy-butterfly

Which should create the pyc and pyo files.
Then SELinux will stop complaining.

Comment 5 Jan Hutař 2010-05-31 00:29:54 UTC
I have tried:

# ls -al /usr/libexec/gnome-panel-add*
-rwxr-xr-x. 1 root root 10436 2009-12-08 21:07 /usr/libexec/gnome-panel-add
# python /usr/libexec/gnome-panel-add
Usage: gnome-panel-add [options]

Options:
  -h, --help           show this help message and exit
  --applet=APPLET      Applet to add
  --copy-launcher      Copy the launcher to the user directory
  --launcher=LAUNCHER  Launcher to add
  --panel=TOPLEVEL     Identifier of the panel where to add the applet
  --position=POSITION  Position on the panel where to add the applet
  --right-stick        Make the applet right-aligned on the panel

# cd /usr/libexec/; python -c "import gnome-panel-add"
  File "<string>", line 1
    import gnome-panel-add
                ^
SyntaxError: invalid syntax
# ls -al /usr/libexec/gnome-panel-add*
-rwxr-xr-x. 1 root root 10436 2009-12-08 21:07 /usr/libexec/gnome-panel-add


It looks like it is more issue with hald or with packaging of these utilities as it should not try to do so.

Reassigning to hal to get some feedback.

Thanks in advance,
Jan

Comment 6 Bug Zapper 2010-11-03 14:19:25 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  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 '12'.

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 12'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 12 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 Hutař 2010-11-04 08:31:58 UTC
Hello,
I have not seen this for quite a long time, so can be closed I guess (still using F12).


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