Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: Got a ton of these just after launching virt-manager on current Fedora Rawhide. SELinux is preventing qemu-system-x86 from 'map' accesses on the anon_inode anon_inode. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that qemu-system-x86 should be allowed map access on the anon_inode anon_inode 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 unconfined_u:unconfined_r:unconfined_t:s0- s0:c0.c1023 Target Context unconfined_u:object_r:unconfined_t:s0 Target Objects anon_inode [ anon_inode ] Source qemu-system-x86 Source Path qemu-system-x86 Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-35.5-1.fc36.noarch Local Policy RPM selinux-policy-targeted-35.5-1.fc36.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 5.16.0-0.rc2.18.fc36.x86_64 #1 SMP PREEMPT Mon Nov 22 18:56:32 UTC 2021 x86_64 x86_64 Alert Count 45 First Seen 2021-11-25 09:42:35 PST Last Seen 2021-11-25 09:43:00 PST Local ID d651df4f-4d7f-4379-814e-de941d48058d Raw Audit Messages type=AVC msg=audit(1637862180.363:567): avc: denied { map } for pid=49235 comm="qemu-system-i38" path="anon_inode:[io_uring]" dev="anon_inodefs" ino=220448 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:unconfined_t:s0 tclass=anon_inode permissive=0 Hash: qemu-system-x86,unconfined_t,unconfined_t,anon_inode,map Version-Release number of selected component: selinux-policy-targeted-35.5-1.fc36.noarch Additional info: component: selinux-policy reporter: libreport-2.15.2 hashmarkername: setroubleshoot kernel: 5.16.0-0.rc2.18.fc36.x86_64 type: libreport
Similar problem has been detected: Dozens of this and similar alerts get generated when running virt-manager on current Rawhide. hashmarkername: setroubleshoot kernel: 5.16.0-0.rc2.18.fc36.x86_64 package: selinux-policy-targeted-35.6-1.fc36.noarch reason: SELinux is preventing qemu-system-x86 from 'map' accesses on the anon_inode anon_inode. type: libreport
I'm seeing a similar problem with selinux-policy-35.8-1.fc36.noarch and kernel v5.16-rc8 when trying to develop new io_uring SELinux/audit tests: type=PROCTITLE msg=audit(01/06/2022 11:48:29.503:4590) : proctitle=./iouring t1 type=MMAP msg=audit(01/06/2022 11:48:29.503:4590) : fd=4 flags=MAP_SHARED|MAP_POPULATE type=SYSCALL msg=audit(01/06/2022 11:48:29.503:4590) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0x260 a2=PROT_READ|PROT_WRITE a3=MAP_SHARED|MAP_POPULATE items=0 ppid=5645 pid=5659 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=3 comm=iouring exe=/root/sources/audit-testsuite/tests/io_uring/iouring subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(01/06/2022 11:48:29.503:4590) : avc: denied { map } for pid=5659 comm=iouring path=anon_inode:[io_uring] dev="anon_inodefs" ino=32519 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:unconfined_t:s0 tclass=anon_inode permissive=0 At the very least it looks like the anon_inode:map permission is needed for unconfined_t.
I see this on f35, too: kernel: 5.16.5-200.fc35.x86_64 selinux-policy-targeted: 35.13-1.fc35.noarch type=AVC msg=audit(1644078086.725:354): avc: denied { map } for pid=1664 comm="qemu-system-x86" path="anon_inode:[io_uring]" dev="anon_inodefs" ino=48211 scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:virtd_t:s0 tclass=anon_inode permissive=0
*** This bug has been marked as a duplicate of bug 2025714 ***