Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1824019 - SELinux is preventing qemu-system-x86 from read, write access on the chr_file /dev/mapper/control.
Summary: SELinux is preventing qemu-system-x86 from read, write access on the chr_file...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f0e86162f61f850f9978b86fdf2...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-15 05:10 UTC by Mikhail
Modified: 2020-07-07 07:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-07 07:46:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1835909 0 medium CLOSED [8.3 regression] avc: denied { read write } for comm="qemu-kvm" path="/dev/mapper/control 2022-05-16 11:32:56 UTC

Internal Links: 1822522

Description Mikhail 2020-04-15 05:10:09 UTC
Description of problem:
Just launch virtual machine
SELinux is preventing qemu-system-x86 from read, write access on the chr_file /dev/mapper/control.

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

If you believe that qemu-system-x86 should be allowed read write access on the control chr_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 'qemu-system-x86' --raw | audit2allow -M my-qemusystemx86
# semodule -X 300 -i my-qemusystemx86.pp

Additional Information:
Source Context                system_u:system_r:svirt_t:s0:c246,c566
Target Context                system_u:object_r:lvm_control_t:s0
Target Objects                /dev/mapper/control [ chr_file ]
Source                        qemu-system-x86
Source Path                   qemu-system-x86
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-3.14.6-11.fc33.noarch
Local Policy RPM              selinux-policy-targeted-3.14.6-11.fc33.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.7.0-0.rc1.git0.1.1.fc33.x86_64
                              #1 SMP Wed Apr 15 09:38:55 +05 2020 x86_64 x86_64
Alert Count                   1
First Seen                    2020-04-15 10:09:17 +05
Last Seen                     2020-04-15 10:09:17 +05
Local ID                      ebfd7c04-3eaf-4674-8975-1e11c52e3f2c

Raw Audit Messages
type=AVC msg=audit(1586927357.64:421): avc:  denied  { read write } for  pid=9077 comm="qemu-system-x86" path="/dev/mapper/control" dev="devtmpfs" ino=3183 scontext=system_u:system_r:svirt_t:s0:c246,c566 tcontext=system_u:object_r:lvm_control_t:s0 tclass=chr_file permissive=1


Hash: qemu-system-x86,svirt_t,lvm_control_t,chr_file,read,write

Version-Release number of selected component:
selinux-policy-3.14.6-11.fc33.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.12.0
hashmarkername: setroubleshoot
kernel:         5.7.0-0.rc1.git0.1.1.fc33.x86_64
type:           libreport

Comment 2 Zdenek Pytela 2020-06-16 13:10:47 UTC
I've submitted a Fedora PR to address the issue:
https://github.com/fedora-selinux/selinux-policy-contrib/pull/269

Comment 3 Zdenek Pytela 2020-07-07 07:46:10 UTC
Merged to rawhide.


Note You need to log in before you can comment on or make changes to this bug.