Bug 575561

Summary: SELinux is preventing /bin/nice "setsched" access. (mysqld_safe nice)
Product: [Fedora] Fedora Reporter: Doncho Gunchev <dgunchev>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:f4af0d6ac09d64eed86154af5f1c33483f8ee99b4aebb284f0281c7ab13d4b7b
Fixed In Version: selinux-policy-3.6.32-106.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 02:12:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Doncho Gunchev 2010-03-21 13:46:53 UTC
Summary:

SELinux is preventing /bin/nice "setsched" access .

Detailed Description:

[nice has a permissive type (mysqld_safe_t). This access was not denied.]

SELinux denied access requested by nice. It is not expected that this access is
required by nice 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                unconfined_u:system_r:mysqld_safe_t:s0
Target Context                unconfined_u:system_r:mysqld_safe_t:s0
Target Objects                None [ process ]
Source                        nice
Source Path                   /bin/nice
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-7.6-9.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-99.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.32.9-70.fc12.x86_64 #1 SMP Wed Mar 3 04:40:41
                              UTC 2010 x86_64 x86_64
Alert Count                   8
First Seen                    Thu 18 Mar 2010 07:51:24 PM EET
Last Seen                     Thu 18 Mar 2010 07:55:38 PM EET
Local ID                      0cc7c259-1baa-4d0f-a97a-05bb6bd988ca
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1268934938.921:43117): avc:  denied  { setsched } for  pid=29076 comm="nice" scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=unconfined_u:system_r:mysqld_safe_t:s0 tclass=process

node=(removed) type=SYSCALL msg=audit(1268934938.921:43117): arch=c000003e syscall=141 success=yes exit=68719476864 a0=0 a1=0 a2=2 a3=2 items=0 ppid=28906 pid=29076 auid=1001 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts9 ses=1 comm="nice" exe="/bin/nice" subj=unconfined_u:system_r:mysqld_safe_t:s0 key=(null)



Hash String generated from  catchall,nice,mysqld_safe_t,mysqld_safe_t,process,setsched
audit2allow suggests:

#============= mysqld_safe_t ==============
allow mysqld_safe_t self:process setsched;

Comment 1 Doncho Gunchev 2010-03-21 13:49:22 UTC
This happens when you add to /etc/my.cnf the following option:

[mysqld_safe]
...
nice = 2

or any other value.

Comment 2 Daniel Walsh 2010-03-22 16:00:24 UTC
Miroslav add

allow mysqld_safe_t self:process { setsched getsched };

Comment 3 Miroslav Grepl 2010-03-23 11:53:07 UTC
Fixed in selinux-policy-3.6.32-106.fc12

Comment 4 Fedora Update System 2010-03-23 18:03:53 UTC
selinux-policy-3.6.32-106.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-106.fc12

Comment 5 Doncho Gunchev 2010-03-23 22:35:26 UTC
Fix confirmed :-)

Comment 6 Fedora Update System 2010-03-24 23:31:01 UTC
selinux-policy-3.6.32-106.fc12 has been pushed to the Fedora 12 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: http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-106.fc12

Comment 7 Fedora Update System 2010-03-30 02:10:33 UTC
selinux-policy-3.6.32-106.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.