Bug 1564428 - SELinux is preventing chown from 'setattr' accesses on the fifo_file .
Summary: SELinux is preventing chown from 'setattr' accesses on the fifo_file .
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: container-selinux
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:ddb5c4ce8cf3204afafcc668409...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-06 09:00 UTC by Joël Wijngaarde
Modified: 2018-05-30 22:39 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-30 22:39:45 UTC
Type: ---


Attachments (Terms of Use)

Description Joël Wijngaarde 2018-04-06 09:00:41 UTC
Description of problem:
This selinux error pops up when I run `docker-compose` up with the following `docker-compose.yaml` :

version: '2'
services:
  postgres:
    image: postgres
    ports:
     - "5432:5432"
    environment:
      - POSTGRES_PASSWORD=postgres
  redis:
    image: "redis:alpine"
    ports:
      - "6379:6379"
  mongodb:
    image: mongo
    ports:
     - "27017:27017"

SELinux is preventing chown from 'setattr' accesses on the fifo_file .

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

If you believe that chown should be allowed setattr access on the  fifo_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'chown' --raw | audit2allow -M my-chown
# semodule -X 300 -i my-chown.pp

Additional Information:
Source Context                system_u:system_r:container_t:s0:c642,c680
Target Context                system_u:system_r:container_runtime_t:s0
Target Objects                 [ fifo_file ]
Source                        chown
Source Path                   chown
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.30.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.15.14-300.fc27.x86_64 #1 SMP Thu
                              Mar 29 16:13:44 UTC 2018 x86_64 x86_64
Alert Count                   8
First Seen                    2018-03-30 14:07:20 CEST
Last Seen                     2018-04-06 10:55:43 CEST
Local ID                      7c973764-40ee-49fc-9a43-e927faf969a5

Raw Audit Messages
type=AVC msg=audit(1523004943.997:757): avc:  denied  { setattr } for  pid=29086 comm="chown" name="" dev="pipefs" ino=770713 scontext=system_u:system_r:container_t:s0:c642,c680 tcontext=system_u:system_r:container_runtime_t:s0 tclass=fifo_file permissive=0


Hash: chown,container_t,container_runtime_t,fifo_file,setattr

Version-Release number of selected component:
selinux-policy-3.13.1-283.30.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.15.14-300.fc27.x86_64
type:           libreport

Comment 1 Daniel Walsh 2018-04-06 12:17:02 UTC
Does everything complete successfully?

This is a tool trying to manipulate the TTY handed into it from the Docker Daemon.  We could just don't audit this if everything worked fine, but you see the AVC.

Probably not something we want to allow in general


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