Bug 1773641 - SELinux is preventing ps from 'sys_ptrace' accesses on the cap_userns labeled ksmtuned_t.
Summary: SELinux is preventing ps from 'sys_ptrace' accesses on the cap_userns labeled...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 31
Hardware: x86_64
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b6c803c3bae2ab5e33b63461628...
: 1775888 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-18 15:40 UTC by Skip Wyatt
Modified: 2020-01-21 01:38 UTC (History)
12 users (show)

Fixed In Version: selinux-policy-3.14.4-44.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-21 01:38:34 UTC
Type: ---


Attachments (Terms of Use)

Description Skip Wyatt 2019-11-18 15:40:48 UTC
Description of problem:
Installed updates and started KSM.
SELinux is preventing ps from 'sys_ptrace' accesses on the cap_userns labeled ksmtuned_t.

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

If you believe that ps should be allowed sys_ptrace access on cap_userns labeled ksmtuned_t 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 'ps' --raw | audit2allow -M my-ps
# semodule -X 300 -i my-ps.pp

Additional Information:
Source Context                system_u:system_r:ksmtuned_t:s0
Target Context                system_u:system_r:ksmtuned_t:s0
Target Objects                Unknown [ cap_userns ]
Source                        ps
Source Path                   ps
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.4-40.fc31.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.3.11-300.fc31.x86_64 #1 SMP Tue
                              Nov 12 19:08:07 UTC 2019 x86_64 x86_64
Alert Count                   6
First Seen                    2019-11-18 10:34:14 EST
Last Seen                     2019-11-18 10:39:14 EST
Local ID                      156f51ee-c3f3-4b8b-9de7-7d1a37c9700f

Raw Audit Messages
type=AVC msg=audit(1574091554.885:602): avc:  denied  { sys_ptrace } for  pid=7258 comm="ps" capability=19  scontext=system_u:system_r:ksmtuned_t:s0 tcontext=system_u:system_r:ksmtuned_t:s0 tclass=cap_userns permissive=0


Hash: ps,ksmtuned_t,ksmtuned_t,cap_userns,sys_ptrace

Version-Release number of selected component:
selinux-policy-3.14.4-40.fc31.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.11.3
hashmarkername: setroubleshoot
kernel:         5.3.11-300.fc31.x86_64
type:           libreport

Comment 1 Stuart Auchterlonie 2019-11-22 16:51:42 UTC
FYI. I also see this on Fedora 30.

Comment 2 Zdenek Pytela 2019-11-25 08:41:03 UTC
*** Bug 1775888 has been marked as a duplicate of this bug. ***

Comment 3 Lukas Vrabec 2019-11-25 17:20:25 UTC
commit d5761e22aa7f8e39bf5ca4d88c6fb00cc5b4422b (HEAD -> rawhide)
Author: Lukas Vrabec <lvrabec>
Date:   Mon Nov 25 18:19:51 2019 +0100

    Allow ksmtuned_t domain to trace processes in user namespace
    
    Resolves: rhbz#1773641

Comment 4 Michael Hampton 2019-12-05 18:23:43 UTC
The status was set to POST, but I don't see which version is this fixed in?

Comment 5 Zdenek Pytela 2019-12-06 12:51:52 UTC
Michael,

This is fixed in rawhide and will be availble in F31 with the next package update, too.

Comment 6 Peter Larsen 2019-12-07 21:44:15 UTC
Similar problem has been detected:

Keeps showing up after login - updated to latest F31 last night may be related. Not sure what modules etc.

hashmarkername: setroubleshoot
kernel:         5.3.14-300.fc31.x86_64
package:        selinux-policy-3.14.4-40.fc31.noarch
reason:         SELinux is preventing ps from 'sys_ptrace' accesses on the cap_userns labeled ksmtuned_t.
type:           libreport

Comment 7 Fedora Update System 2020-01-14 01:43:24 UTC
selinux-policy-3.14.4-44.fc31 has been pushed to the Fedora 31 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-2020-397eea28b7

Comment 8 Fedora Update System 2020-01-21 01:38:34 UTC
selinux-policy-3.14.4-44.fc31 has been pushed to the Fedora 31 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.