Bug 2129565

Summary: SELinux is preventing libvirt_leasesh from using the execmem access on a process.
Product: [Fedora] Fedora Reporter: sirlennoxdev
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 37CC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnacek, pkoncity, plautrba, sirlennoxdev, vmojzis, zpytela
Target Milestone: ---Keywords: SELinux
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-26 15:53:57 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 sirlennoxdev 2022-09-24 21:14:13 UTC
SELinux is preventing libvirt_leasesh from using the execmem access on a process.

*****  Plugin allow_execmem (91.4 confidence) suggests   *********************

If this issue occurred during normal system operation.
Then this alert could be a serious issue and your system could be compromised.
Do
contact your security administrator and report this issue

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that libvirt_leasesh should be allowed execmem access on processes labeled dnsmasq_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 'libvirt_leasesh' --raw | audit2allow -M my-libvirtleasesh
# semodule -X 300 -i my-libvirtleasesh.pp

Additional Information:
Source Context                system_u:system_r:dnsmasq_t:s0-s0:c0.c1023
Target Context                system_u:system_r:dnsmasq_t:s0-s0:c0.c1023
Target Objects                Unknown [ process ]
Source                        libvirt_leasesh
Source Path                   libvirt_leasesh
Port                          <Unknown>
Host                          fedora
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-37.8-1.fc37.noarch
Local Policy RPM              selinux-policy-targeted-37.8-1.fc37.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     fedora
Platform                      Linux fedora 5.19.10-300.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Tue Sep 20 15:13:35 UTC 2022
                              x86_64 x86_64
Alert Count                   5
First Seen                    2022-09-24 21:22:17 CEST
Last Seen                     2022-09-24 22:57:08 CEST
Local ID                      b3294ad2-96df-4884-93d8-e1eeb146a776

Raw Audit Messages
type=AVC msg=audit(1664053028.959:653): avc:  denied  { execmem } for  pid=70220 comm="libvirt_leasesh" scontext=system_u:system_r:dnsmasq_t:s0-s0:c0.c1023 tcontext=system_u:system_r:dnsmasq_t:s0-s0:c0.c1023 tclass=process permissive=0


Hash: libvirt_leasesh,dnsmasq_t,dnsmasq_t,process,execmem

Comment:

This error occurred on starting a virtual machine and many of these "access policy" errors occurred in the past after updating to Fedora 37.

Comment 1 Zdenek Pytela 2022-09-26 15:53:57 UTC

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