Bug 608640

Summary: SELinux is preventing /usr/bin/totem-video-thumbnailer "setrlimit" access .
Product: Red Hat Enterprise Linux 6 Reporter: Matěj Cepl <mcepl>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: dwalsh, eparis, jmorris, mmalik, sdsmall
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:fb976057edbd466384a92016fc65e061a43bb30ac53454ea7f3a3fa0d6b8cc2c
Fixed In Version: selinux-policy-3.7.19-32.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 21:34:57 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 Matěj Cepl 2010-06-28 11:19:43 UTC
When starting gnome-shell, I get a lot of errors in totem-video-thumbnailer


Souhrn:

SELinux is preventing /usr/bin/totem-video-thumbnailer "setrlimit" access .

Podrobný popis:

[totem-video-thu je v toleratním režimu (staff_execmem_t). Přístup byl
povolen.]

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

Povolení přístupu:

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.

Další informace:

Kontext zdroje                staff_u:staff_r:staff_execmem_t:s0-s0:c0.c1023
Kontext cíle                 staff_u:staff_r:staff_execmem_t:s0-s0:c0.c1023
Objekty cíle                 None [ process ]
Zdroj                         totem-video-thu
Cesta zdroje                  /usr/bin/totem-video-thumbnailer
Port                          <Neznámé>
Počítač                    (removed)
RPM balíčky zdroje          totem-2.28.6-1.el6
RPM balíčky cíle           
RPM politiky                  selinux-policy-3.7.19-27.el6
Selinux povolen               True
Typ politiky                  targeted
Vynucovací režim            Enforcing
Název zásuvného modulu     catchall
Název počítače            (removed)
Platforma                     Linux (removed) 2.6.32-37.el6.x86_64 #1
                              SMP Sun Jun 20 19:29:35 EDT 2010 x86_64 x86_64
Počet upozornění           6
Poprvé viděno               Po 28. červen 2010, 12:39:04 CEST
Naposledy viděno             Po 28. červen 2010, 12:39:25 CEST
Místní ID                   86e1ffc5-03df-4d44-8954-e45737916d07
Čísla řádků              

Původní zprávy auditu      

node=(removed) type=AVC msg=audit(1277721565.63:53823): avc:  denied  { setrlimit } for  pid=29023 comm="totem-video-thu" scontext=staff_u:staff_r:staff_execmem_t:s0-s0:c0.c1023 tcontext=staff_u:staff_r:staff_execmem_t:s0-s0:c0.c1023 tclass=process

node=(removed) type=SYSCALL msg=audit(1277721565.63:53823): arch=c000003e syscall=160 success=yes exit=73014444160 a0=0 a1=7fff95acef00 a2=d a3=1 items=0 ppid=28916 pid=29023 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts6 ses=1 comm="totem-video-thu" exe="/usr/bin/totem-video-thumbnailer" subj=staff_u:staff_r:staff_execmem_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,totem-video-thu,staff_execmem_t,staff_execmem_t,process,setrlimit
audit2allow suggests:

#============= staff_execmem_t ==============
allow staff_execmem_t self:process setrlimit;

Comment 2 RHEL Program Management 2010-06-28 11:42:52 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Daniel Walsh 2010-06-28 13:41:58 UTC
Should we just allow this for a confined user?  staff_t, user_t.  Since setrlimit can only lower priority if you do not have CAP_SYS_RESOURCE?

Comment 4 Stephen Smalley 2010-06-28 19:09:49 UTC
Only concern is if the confined user domain can transition to some privileged program domain and you are concerned about the confined user domain trying to induce a failure in the privileged program by first lowering the hard limits prior to exec'ing it.  That was the original rationale for the setrlimit and rlimitinh checks.

Comment 5 Daniel Walsh 2010-06-29 12:13:50 UTC
Should I add a boolean then.   users_can_setrlimit?

Comment 6 Daniel Walsh 2010-07-12 15:42:17 UTC
Miroslav,  Please add

## <desc>
## <p>
## Allow user processes to change their priority 
## </p>
## </desc>
gen_tunable(user_setrlimit, false)

And

	tunable_policy(`user_setrlimit',`
		allow $1_usertype self:process setrlimit;
	')

to 

template(`userdom_unpriv_user_template', `


And default this to true in booleans-targeted.conf

Comment 8 Miroslav Grepl 2010-07-14 14:26:18 UTC
Fixed in selinux-policy-3.7.19-32.el6.noarch

Comment 11 releng-rhel@redhat.com 2010-11-10 21:34:57 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.