Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1052177 - SELinux is preventing /usr/bin/tar from using the chown capability.
Summary: SELinux is preventing /usr/bin/tar from using the chown capability.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-13 12:57 UTC by Juan Orti
Modified: 2014-01-16 07:13 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-116.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-16 07:13:55 UTC
Type: Bug


Attachments (Terms of Use)

Description Juan Orti 2014-01-13 12:57:57 UTC
Description of problem:
I've configured the service abrt-upload-watch to receive abrt crashes from remote servers. When it tries to untar them, I get this errors. It tries to set the uid 25 (named) which is not installed in this server.

SELinux is preventing /usr/bin/tar from using the chown capability.

*****  Plugin catchall (100. confidence) suggests   **************************

If cree que tar debería tener la capacidad de chown de forma predeterminada.
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso momentáneamente executando:
# grep tar /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


Additional Information:
Source Context                system_u:system_r:abrt_upload_watch_t:s0
Target Context                system_u:system_r:abrt_upload_watch_t:s0
Target Objects                 [ capability ]
Source                        tar
Source Path                   /usr/bin/tar
Port                          <Unknown>
Host                          <removed>
Source RPM Packages           tar-1.26-30.fc20.x86_64
Target RPM Packages
Policy RPM                    selinux-policy-3.12.1-106.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     <removed>
Platform                      Linux <removed> 3.12.6-300.fc20.x86_64 #1
                              SMP Mon Dec 23 16:44:31 UTC 2013 x86_64 x86_64
Alert Count                   4
First Seen                    2014-01-13 13:43:30 CET
Last Seen                     2014-01-13 13:43:30 CET
Local ID                      7a683cce-3722-40c1-8230-e24b5d05b296

Raw Audit Messages
type=AVC msg=audit(1389617010.884:4222): avc:  denied  { chown } for  pid=1639 comm="tar" capability=0  scontext=system_u:system_r:abrt_upload_watch_t:s0 tcontext=system_u:system_r:abrt_upload_watch_t:s0 tclass=capability


type=SYSCALL msg=audit(1389617010.884:4222): arch=x86_64 syscall=fchown success=no exit=EPERM a0=4 a1=19 a2=ad a3=1ff items=0 ppid=1636 pid=1639 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=tar exe=/usr/bin/tar subj=system_u:system_r:abrt_upload_watch_t:s0 key=(null)

Hash: tar,abrt_upload_watch_t,abrt_upload_watch_t,capability,chown

Comment 1 Miroslav Grepl 2014-01-13 13:35:43 UTC
commit 4a7f97cb040632affbd5d5991507cf754e481ee4
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Mon Jan 13 14:35:29 2014 +0100

    Add also chown cap for abrt_upload_watch_t. It already has dac_override

Comment 2 Fedora Update System 2014-01-13 22:59:16 UTC
selinux-policy-3.12.1-116.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-116.fc20

Comment 3 Fedora Update System 2014-01-15 06:00:59 UTC
Package selinux-policy-3.12.1-116.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-116.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0806/selinux-policy-3.12.1-116.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-01-16 07:13:55 UTC
selinux-policy-3.12.1-116.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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