Bug 2091615

Summary: SELinux is preventing /usr/lib/frr/watchfrr from map access on the file /var/tmp/frr/watchfrr.49857/logbuf.49858.
Product: Red Hat Enterprise Linux 8 Reporter: Brian J. Murrell <brian>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.6CC: lvrabec, mmalik, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-14 16:10:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brian J. Murrell 2022-05-30 13:43:39 UTC
SELinux is preventing /usr/lib/frr/watchfrr from map access on the file /var/tmp/frr/watchfrr.49857/logbuf.49858.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow any process to mmap any file on system with attribute file_type.
Then you must tell SELinux about this by enabling the 'domain_can_mmap_files' boolean.
You can read 'init_selinux' man page for more details.
Do
setsebool -P domain_can_mmap_files 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that watchfrr should be allowed map access on the logbuf.49858 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 'watchfrr' --raw | audit2allow -M my-watchfrr
# semodule -X 300 -i my-watchfrr.pp


Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:init_tmp_t:s0
Target Objects                /var/tmp/frr/watchfrr.49857/logbuf.49858 [ file ]
Source                        watchfrr
Source Path                   /usr/lib/frr/watchfrr
Port                          <Unknown>
Host                          server.interlinx.bc.ca
Source RPM Packages           frr-7.5-11.el8.x86_64
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.3-80.el8_5.2.noarch
                              selinux-policy-targeted-3.14.3-95.el8.noarch
Local Policy RPM              selinux-policy-targeted-3.14.3-80.el8_5.2.noarch
                              selinux-policy-targeted-3.14.3-95.el8.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     server.interlinx.bc.ca
Platform                      Linux server.interlinx.bc.ca
                              4.18.0-348.12.2.el8_5.x86_64 #1 SMP Wed Jan 19
                              14:35:04 EST 2022 x86_64 x86_64
Alert Count                   5
First Seen                    2022-01-31 03:22:32 EST
Last Seen                     2022-05-29 15:43:09 EDT
Local ID                      353cecb6-69b4-42c3-a2b6-09b885cb5d68

Raw Audit Messages
type=AVC msg=audit(1653853389.199:37067): avc:  denied  { map } for  pid=49858 comm="watchfrr" path="/var/tmp/frr/watchfrr.49857/logbuf.49858" dev="dm-8" ino=1180630 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:init_tmp_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1653853389.199:37067): arch=x86_64 syscall=mmap success=no exit=EACCES a0=0 a1=2000 a2=3 a3=1 items=0 ppid=49857 pid=49858 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=watchfrr exe=/usr/lib/frr/watchfrr subj=system_u:system_r:init_t:s0 key=(null)

Hash: watchfrr,init_t,init_tmp_t,file,map

Comment 1 Zdenek Pytela 2022-06-14 16:10:06 UTC

*** This bug has been marked as a duplicate of bug 1941765 ***