Bug 1740385

Summary: SELinux is preventing bwrap from 'getattr' accesses on the archivo /proc/sys/user/max_user_namespaces.
Product: [Fedora] Fedora Reporter: Francisco de la Peña <fran>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: dwalsh, lvrabec, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:9baad4241907806160e7fce49c307e46211fc9bed6285875e268d417a674827e;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.14.3-45.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-06 12:33:50 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 Francisco de la Peña 2019-08-12 19:27:21 UTC
Description of problem:
SELinux is preventing bwrap from 'getattr' accesses on the archivo /proc/sys/user/max_user_namespaces.

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

Si cree que de manera predeterminada se debería permitir a bwrap el acceso getattr sobre  max_user_namespaces file.     
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 temporalmente ejecutando:
# ausearch -c 'bwrap' --raw | audit2allow -M mi-bwrap
# semodule -X 300 -i mi-bwrap.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:sysctl_t:s0
Target Objects                /proc/sys/user/max_user_namespaces [ file ]
Source                        bwrap
Source Path                   bwrap
Port                          <Desconocido>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.3-43.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.2.7-200.fc30.x86_64 #1 SMP Thu
                              Aug 8 05:35:29 UTC 2019 x86_64 x86_64
Alert Count                   70
First Seen                    2019-07-13 19:50:29 CST
Last Seen                     2019-08-12 13:25:24 CST
Local ID                      0a37a38f-6caf-41cd-bbf3-2f2ea958868c

Raw Audit Messages
type=AVC msg=audit(1565637924.787:272): avc:  denied  { getattr } for  pid=2607 comm="bwrap" path="/proc/sys/user/max_user_namespaces" dev="proc" ino=43441 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysctl_t:s0 tclass=file permissive=0


Hash: bwrap,xdm_t,sysctl_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.14.3-43.fc30.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.1
hashmarkername: setroubleshoot
kernel:         5.2.7-200.fc30.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2019-08-13 11:54:06 UTC
commit 475293b8171c106218679c4f63defc0ae867ad6f (HEAD -> rawhide)
Author: Lukas Vrabec <lvrabec>
Date:   Tue Aug 13 13:53:46 2019 +0200

    Allow xdm_t domain to read kernel sysctl BZ(1740385)

Comment 2 Fedora Update System 2019-09-05 06:52:17 UTC
FEDORA-2019-be14ea0375 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-be14ea0375

Comment 3 Fedora Update System 2019-09-05 12:53:13 UTC
selinux-policy-3.14.3-45.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-be14ea0375

Comment 4 Fedora Update System 2019-09-06 12:33:50 UTC
selinux-policy-3.14.3-45.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.