Bug 629202

Summary: SELinux is preventing /usr/sbin/gnome-power-backlight-helper "write" access on brightness.
Product: [Fedora] Fedora Reporter: Naoki <naoki>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: aeneby, anto.trande, awilliam, christian.joensson, dwalsh, eparis, grinnz, icj, mgrepl, michelduquaine, naoki, pavel.ondracka, sds
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:fd1d693c1093b2db6c98830010bb83b284a2640fbcbca3167f0c5f9ad85e4663
Fixed In Version: selinux-policy-3.9.3-1.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-10 23:42:58 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Naoki 2010-09-01 05:11:39 EDT

SELinux is preventing /usr/sbin/gnome-power-backlight-helper "write" access on

Detailed Description:

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

Additional Information:

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                brightness [ file ]
Source                        gnome-power-bac
Source Path                   /usr/sbin/gnome-power-backlight-helper
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-power-manager-2.31.91-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.0-2.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) #1
                              SMP Fri Aug 27 07:45:05 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 01 Sep 2010 06:09:50 PM JST
Last Seen                     Wed 01 Sep 2010 06:09:50 PM JST
Local ID                      1a8def68-fa73-4f67-a23f-6ee177fc3dad
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1283332190.490:10): avc:  denied  { write } for  pid=1881 comm="gnome-power-bac" name="brightness" dev=sysfs ino=15841 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1283332190.490:10): arch=c000003e syscall=2 success=no exit=-13 a0=10231a0 a1=1 a2=20 a3=7fff639b9b80 items=0 ppid=1826 pid=1881 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="gnome-power-bac" exe="/usr/sbin/gnome-power-backlight-helper" subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  catchall,gnome-power-bac,xdm_t,sysfs_t,file,write
audit2allow suggests:

#============= xdm_t ==============
allow xdm_t sysfs_t:file write;
Comment 1 Daniel Walsh 2010-09-01 09:12:33 EDT
Eric, how do you think we should handle these?  We might want to break up the /sys file system with labels.  But not sure what the proper granularity would be.
Comment 2 Adam Williamson 2010-09-02 14:45:35 EDT
I hit this one too, btw.

Fedora Bugzappers volunteer triage team
Comment 3 Daniel Walsh 2010-09-03 10:15:14 EDT
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.9.2-2.fc14
Comment 4 Fedora Update System 2010-09-08 14:41:48 EDT
selinux-policy-3.9.3-1.fc14 has been submitted as an update for Fedora 14.
Comment 5 Fedora Update System 2010-09-09 00:12:29 EDT
selinux-policy-3.9.3-1.fc14 has been pushed to the Fedora 14 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: https://admin.fedoraproject.org/updates/selinux-policy-3.9.3-1.fc14
Comment 6 Fedora Update System 2010-09-10 23:41:14 EDT
selinux-policy-3.9.3-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.