Bug 2081864 - SELinux is preventing stress-ng from 'map' accesses on the directory /proc/<pid>.
Summary: SELinux is preventing stress-ng from 'map' accesses on the directory /proc/<p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 37
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:ca162ed8b3f5d129a6c3a215b5b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-04 21:48 UTC by Mikhail
Modified: 2022-09-27 00:16 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-37.12-2.fc37
Clone Of:
Environment:
Last Closed: 2022-09-27 00:16:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1191 0 None open Dontaudit domain map permission on directories 2022-08-11 18:18:37 UTC

Description Mikhail 2022-05-04 21:48:08 UTC
Description of problem:
SELinux is preventing stress-ng from 'map' accesses on the directory /proc/<pid>.

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

If you believe that stress-ng should be allowed map access on the <pid> directory 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 'stress-ng' --raw | audit2allow -M my-stressng
# semodule -X 300 -i my-stressng.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:unconfined_t:s0-
                              s0:c0.c1023
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-
                              s0:c0.c1023
Target Objects                /proc/<pid> [ dir ]
Source                        stress-ng
Source Path                   stress-ng
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-37.1-1.fc37.noarch
Local Policy RPM              selinux-policy-targeted-37.1-1.fc37.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.18.0-
                              0.rc5.20220503git9050ba3a61a4b5b.41.fc37.x86_64 #1
                              SMP PREEMPT_DYNAMIC Tue May 3 14:03:53 UTC 2022
                              x86_64 x86_64
Alert Count                   28
First Seen                    2022-05-05 02:45:57 +05
Last Seen                     2022-05-05 02:46:41 +05
Local ID                      ea1043b0-a90e-4b86-bc37-bc909d9e9c27

Raw Audit Messages
type=AVC msg=audit(1651700801.804:609): avc:  denied  { map } for  pid=5411 comm="stress-ng" path="/proc/10381" dev="proc" ino=67726 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=dir permissive=0


Hash: stress-ng,unconfined_t,unconfined_t,dir,map

Version-Release number of selected component:
selinux-policy-targeted-37.1-1.fc37.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.17.1
hashmarkername: setroubleshoot
kernel:         5.18.0-0.rc5.20220503git9050ba3a61a4b5b.41.fc37.x86_64
type:           libreport

Comment 1 Mikhail 2022-05-04 21:54:37 UTC
Similar problem has been detected:

# stress-ng --all 8  --timeout 60s --metrics-brief --tz
causes this alert

hashmarkername: setroubleshoot
kernel:         5.18.0-0.rc5.20220503git9050ba3a61a4b5b.41.fc37.x86_64
package:        selinux-policy-targeted-37.1-1.fc37.noarch
reason:         SELinux is preventing stress-ng from 'map' accesses on the directory /proc/<pid>.
type:           libreport

Comment 2 Ben Cotton 2022-08-09 13:41:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 3 Fedora Update System 2022-09-23 16:27:31 UTC
FEDORA-2022-839f7bd62c has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-839f7bd62c

Comment 4 Fedora Update System 2022-09-24 02:59:56 UTC
FEDORA-2022-839f7bd62c has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-839f7bd62c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-839f7bd62c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2022-09-27 00:16:02 UTC
FEDORA-2022-839f7bd62c has been pushed to the Fedora 37 stable repository.
If problem still persists, 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.