Fedora Account System
Red Hat Associate
Red Hat Customer
type=AVC msg=audit(1726210659.521:22786): avc: denied { read write } for pid=1122774 comm="bash" path="/dev/pts/0" dev="devpts" ino=3 scontext=system_u:system_r:container_t:s0:c539,c854 tcontext=system_u:object_r:container_file_t:s0:c539,c854 tclass=chr_file permissive=0 AVC with '/bin/echo' command: type=AVC msg=audit(1726210760.204:22810): avc: denied { read write } for pid=1123360 comm="echo" path="/dev/pts/0" dev="devpts" ino=3 scontext=system_u:system_r:container_t:s0:c142,c697 tcontext=system_u:object_r:container_file_t:s0:c142,c697 tclass=chr_file permissive=0 $ rpm -q container-selinux selinux-policy-targeted container-selinux-2.233.0-1.fc41.noarch selinux-policy-targeted-41.17-1.fc41.noarch Reproducible: Always
For podman run --rm -ti quay.io/centos/centos:stream9 Audit2allow gives me this: #============= container_t ============== allow container_t container_file_t:chr_file { read write }; allow container_t data_home_t:file read; The `podman run --privileged` doesn't suffer from this problem.
@praiskup is this on a fresh f41 instance? Also, did you notice it on any other releases of Fedora? FWIW, I don't see any issues on my rawhide env. I'll try to reproduce this on a testing-farm instance.
This is allowed, I have a feeling something with container-selinux did not install correctly. sudo dnf -y reinstall container-selinux
> @praiskup is this on a fresh f41 instance? No, this is a box that I upgraded from F40. > did you notice it on any other releases of Fedora? Good point, no. This started with the upgrade to F41. > sudo dnf -y reinstall container-selinux Doesn't help :-( tried several times, as mentioned here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-52c1264778
# sesearch --allow | grep container_file_t allow container_file_t devpts_t:filesystem associate; allow container_file_t root_t:filesystem associate; allow svirt_sandbox_domain container_file_t:blk_file { append getattr ioctl lock open read setattr write }; allow svirt_sandbox_domain container_file_t:dir { add_name create execmod ioctl link lock read relabelfrom relabelto remove_name rename reparent rmdir setattr unlink watch watch_reads write }; allow svirt_sandbox_domain container_file_t:fifo_file { append create getattr ioctl link lock open read rename setattr unlink write }; allow svirt_sandbox_domain container_file_t:file { append create execmod execute execute_no_trans getattr ioctl link lock map open read relabelfrom relabelto rename setattr unlink watch watch_reads write }; allow svirt_sandbox_domain container_file_t:filesystem remount; allow svirt_sandbox_domain container_file_t:lnk_file { append create getattr ioctl link lock read rename setattr unlink watch watch_reads write }; allow svirt_sandbox_domain container_file_t:sock_file { append create getattr ioctl link lock open read rename setattr unlink write }; allow system_dbusd_t container_file_t:dir { ioctl lock read }; allow virsh_t container_file_t:chr_file { create link open rename setattr unlink }; allow virsh_t container_file_t:dir { add_name create getattr ioctl link lock open read remove_name rename reparent rmdir search setattr unlink watch watch_reads write }; allow virsh_t container_file_t:fifo_file { append create getattr ioctl link lock open read rename setattr unlink write }; allow virsh_t container_file_t:file { append create getattr ioctl link lock open read rename setattr unlink watch watch_reads write }; allow virsh_t container_file_t:lnk_file { append create getattr ioctl link lock read rename setattr unlink watch watch_reads write }; allow virsh_t container_file_t:sock_file { append create getattr ioctl link lock open read rename setattr unlink write };
Dnf5 log claims this whenever I try to reinstall selinux-policy-targeted/container-selinux: 2024-09-19T05:24:11+0000 [2433857] INFO RPM callback start post-install scriptlet "container-selinux-2:2.233.0-1.fc41.noarch" 2024-09-19T05:24:15+0000 [2433857] INFO [scriptlet] Failed to resolve typeattributeset statement at /var/lib/selinux/targeted/tmp/modules/200/snappy/cil:223 2024-09-19T05:24:15+0000 [2433857] INFO [scriptlet] Failed to resolve AST 2024-09-19T05:24:15+0000 [2433857] INFO [scriptlet] semodule: Failed! I tried to get the latest selinux-policy update: $ koji-tool install -R selinux-policy-41.18-1.fc41 But no help, still the same problem. Is this a selinux-policy problem, then?
Ok, removing snapd package helped.
Namely `dnf remove snapd-selinux-2.65.1-0.fc41.noarch` (and all the deps).
Please rebuild with the latest selinux-policy. Additionally, always ensure that calling interfaces from other non-base modules are in the optional block, e.g. 348 # or on some systems same dbus API may be provided by timedatex 349 # RHEL7: there is no timedatex.if 350 ifndef(`distro_rhel7',` 351 timedatex_dbus_chat(snappy_t) 352 ') see #L430 for the correct usage. It is also the case of miscfiles, logging, gnome, userdom, mandb.
I haven't mentioned 1 important bit: remove references to timedatex which is not shipped any longer, either unconditionally for all releases, or keep it present for rhel 8 only. Not having the interface in an optional block makes the whole module invalid.
This message is a reminder that Fedora Linux 41 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 41 on 2025-12-15. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '41'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 41 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 41 entered end-of-life (EOL) status on 2025-12-15. Fedora Linux 41 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.