Bug 461012 - SELinux is preventing radeontool (hald_t) "write" to mem (memory_device_t)
SELinux is preventing radeontool (hald_t) "write" to mem (memory_device_t)
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2008-09-03 10:13 EDT by John Poelstra
Modified: 2008-11-17 17:05 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-17 17:05:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Poelstra 2008-09-03 10:13:00 EDT
Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. suspend notebook
2. resume


SELinux is preventing radeontool (hald_t) "write" to mem (memory_device_t).

Detailed Description:

[SELinux is in permissive mode, the operation would have been denied but was
permitted due to permissive mode.]

SELinux denied access requested by radeontool. It is not expected that this
access is required by radeontool 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:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for mem,

restorecon -v 'mem'

If this does not work, there is currently no automatic way to allow this access.
Instead, you can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context                system_u:system_r:hald_t:s0
Target Context                system_u:object_r:memory_device_t:s0
Target Objects                mem [ chr_file ]
Source                        radeontool
Source Path                   /usr/sbin/radeontool
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           radeontool-1.5-3.fc9
Target RPM Packages           
Policy RPM                    selinux-policy-3.3.1-84.fc9
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Permissive
Plugin Name                   catchall_file
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain
                              #1 SMP Fri Jun 27 16:14:35 EDT 2008 i686 i686
Alert Count                   19
First Seen                    Fri 06 Jun 2008 07:14:10 AM PDT
Last Seen                     Tue 02 Sep 2008 08:52:32 PM PDT
Local ID                      a585aeb1-a755-42ac-ada6-4ec5e1c64115
Line Numbers                  

Raw Audit Messages            

host=localhost.localdomain type=AVC msg=audit(1220413952.714:213): avc:  denied  { write } for  pid=29406 comm="radeontool" name="mem" dev=tmpfs ino=3701 scontext=system_u:system_r:hald_t:s0 tcontext=system_u:object_r:memory_device_t:s0 tclass=chr_file

host=localhost.localdomain type=SYSCALL msg=audit(1220413952.714:213): arch=40000003 syscall=5 success=yes exit=3 a0=804edb8 a1=2 a2=9c26008 a3=9c26050 items=0 ppid=29405 pid=29406 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="radeontool" exe="/usr/sbin/radeontool" subj=system_u:system_r:hald_t:s0 key=(null)
Comment 1 Daniel Walsh 2008-09-03 13:20:46 EDT
If you 

chcon -t hald_mac_exec_t /usr/sbin/radeontool

Does it suspend/resume work without generating any AVC messages?
Comment 2 John Poelstra 2008-09-03 13:39:55 EDT
No.  Here is the raw message.

host=localhost.localdomain type=AVC msg=audit(1220463480.644:246): avc: denied { write } for pid=7389 comm="radeontool" path="/var/log/pm-suspend.log" dev=sda2 ino=382078 scontext=system_u:system_r:hald_mac_t:s0 tcontext=system_u:object_r:hald_log_t:s0 tclass=file host=localhost.localdomain type=SYSCALL msg=audit(1220463480.644:246): arch=40000003 syscall=11 success=yes exit=0 a0=8982728 a1=89736e8 a2=8974740 a3=0 items=0 ppid=7388 pid=7389 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="radeontool" exe="/usr/sbin/radeontool" subj=system_u:system_r:hald_mac_t:s0 key=(null)
Comment 3 Daniel Walsh 2008-09-03 14:02:11 EDT
Ok I can add that rule also.

You can add these rules for now using

# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fixed in selinux-policy-3.3.1-88.fc9
Comment 4 Daniel Walsh 2008-11-17 17:05:40 EST
Closing all bugs that have been in modified for over a month.  Please reopen if the bug is not actually fixed.

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