Bug 2070729

Summary: SELinux is preventing dnf from using the 'mac_admin' capabilities.
Product: [Fedora] Fedora Reporter: lray+redhatbugzilla
Component: snapdAssignee: Zygmunt Krynicki <me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: amessina, dwalsh, go-sig, grepl.miroslav, lvrabec, maciek.borzecki, me, mmalik, ngompa13, omosnace, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:af406c01e613a5ffcdad7f813a3e80916b688c0f6ccdf30f87cf7254b223b8a8;VARIANT_ID=workstation;
Fixed In Version: snapd-2.55.3-2.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-26 07:30:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2056303    

Description lray+redhatbugzilla 2022-03-31 19:14:22 UTC
Description of problem:
dnf upgrade for the following packages

  Vorbereitung läuft    :                                                   1/1 
  Aktualisieren         : runc-2:1.1.1-1.fc36.x86_64                       1/26 
Fehler: lsetfilecon: (/usr/bin/runc;6245fd01, system_u:object_r:container_runtime_exec_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package runc-2:1.1.1-1.fc36.x86_64
  Aktualisieren         : containerd-1.6.1-1.fc36.x86_64                   2/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /usr/bin/runc;6245fd01: cpio: (Fehler 0x2)
Fehler: runc-2:1.1.1-1.fc36.x86_64: installieren fehlgeschlagen
Fehler: lsetfilecon: (/etc/containerd, system_u:object_r:container_config_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package containerd-1.6.1-1.fc36.x86_64
  Aktualisieren         : containers-common-4:1-53.fc36.noarch             3/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /etc/containerd: cpio: (Fehler 0x2)
Fehler: containerd-1.6.1-1.fc36.x86_64: installieren fehlgeschlagen
Fehler: lsetfilecon: (/var/lib/containers/sigstore, system_u:object_r:container_var_lib_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package containers-common-4:1-53.fc36.noarch
  Aktualisieren         : conmon-2:2.1.0-2.fc36.x86_64                     4/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /var/lib/containers/sigstore: cpio: (Fehler 0x2)
Fehler: containers-common-4:1-53.fc36.noarch: installieren fehlgeschlagen
Fehler: lsetfilecon: (/usr/bin/conmon;6245fd01, system_u:object_r:conmon_exec_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package conmon-2:2.1.0-2.fc36.x86_64
  Aktualisieren         : podman-3:4.0.2-1.fc36.x86_64                     5/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /usr/bin/conmon;6245fd01: cpio: (Fehler 0x2)
Fehler: conmon-2:2.1.0-2.fc36.x86_64: installieren fehlgeschlagen
Fehler: lsetfilecon: (/usr/bin/podman;6245fd01, system_u:object_r:container_runtime_exec_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package podman-3:4.0.2-1.fc36.x86_64
  Ausgeführtes Scriptlet: moby-engine-20.10.12-3.fc36.x86_64               6/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /usr/bin/podman;6245fd01: cpio: (Fehler 0x2)
Fehler: podman-3:4.0.2-1.fc36.x86_64: installieren fehlgeschlagen

  Aktualisieren         : moby-engine-20.10.12-3.fc36.x86_64               6/26 
Fehler: lsetfilecon: (/usr/bin/docker;6245fd01, system_u:object_r:container_runtime_exec_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package moby-engine-20.10.12-3.fc36.x86_64
  Aktualisieren         : tpm2-abrmd-2.4.1-1.fc36.x86_64                   7/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /usr/bin/docker;6245fd01: cpio: (Fehler 0x2)
Fehler: moby-engine-20.10.12-3.fc36.x86_64: installieren fehlgeschlagen
Fehler: lsetfilecon: (/usr/sbin/tpm2-abrmd;6245fd01, system_u:object_r:tabrmd_exec_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package tpm2-abrmd-2.4.1-1.fc36.x86_64
  Aktualisieren         : swtpm-0.7.2-1.20220307git21c90c1.fc36.x86_64     8/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /usr/sbin/tpm2-abrmd;6245fd01: cpio: (Fehler 0x2)
Fehler: tpm2-abrmd-2.4.1-1.fc36.x86_64: installieren fehlgeschlagen
Fehler: lsetfilecon: (/usr/bin/swtpm;6245fd01, system_u:object_r:swtpm_exec_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package swtpm-0.7.2-1.20220307git21c90c1.fc36.x86_64
  Aktualisieren         : snapd-2.54.4-1.fc36.x86_64                       9/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /usr/bin/swtpm;6245fd01: cpio: (Fehler 0x2)
Fehler: swtpm-0.7.2-1.20220307git21c90c1.fc36.x86_64: installieren fehlgeschlagen
Fehler: lsetfilecon: (/etc/sysconfig/snapd;6245fd01, system_u:object_r:snappy_config_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package snapd-2.54.4-1.fc36.x86_64
  Aktualisieren         : lxc-4.0.10-2.fc36.x86_64                        10/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /etc/sysconfig/snapd;6245fd01: cpio: (Fehler 0x2)
Fehler: snapd-2.54.4-1.fc36.x86_64: installieren fehlgeschlagen
Fehler: lsetfilecon: (/usr/bin/lxc-attach;6245fd01, system_u:object_r:container_runtime_exec_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package lxc-4.0.10-2.fc36.x86_64
  Ausgeführtes Scriptlet: flatpak-1.12.7-1.fc36.x86_64                    11/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /usr/bin/lxc-attach;6245fd01: cpio: (Fehler 0x2)
Fehler: lxc-4.0.10-2.fc36.x86_64: installieren fehlgeschlagen

  Aktualisieren         : flatpak-1.12.7-1.fc36.x86_64                    11/26 
Fehler: lsetfilecon: (/usr/libexec/flatpak-system-helper;6245fd01, system_u:object_r:flatpak_helper_exec_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package flatpak-1.12.7-1.fc36.x86_64
  Aktualisieren         : docker-compose-1.29.2-4.fc36.noarch             12/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /usr/libexec/flatpak-system-helper;6245fd01: cpio: (Fehler 0x2)
Fehler: flatpak-1.12.7-1.fc36.x86_64: installieren fehlgeschlagen
Fehler: lsetfilecon: (/usr/bin/docker-compose;6245fd01, system_u:object_r:container_runtime_exec_t:s0) Das Argument ist ungültig
Fehler: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package docker-compose-1.29.2-4.fc36.noarch
  Aktualisieren         : signal-desktop-5.37.0-1.fc36.x86_64             13/26 
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /usr/bin/docker-compose;6245fd01: cpio: (Fehler 0x2)
Fehler: docker-compose-1.29.2-4.fc36.noarch: installieren fehlgeschlagen

  Aufräumen             : signal-desktop-5.36.0-1.fc36.x86_64             14/26 
Fehler: docker-compose-1.29.2-3.fc35.noarch: löschen übersprungen

  Ausgeführtes Scriptlet: signal-desktop-5.36.0-1.fc36.x86_64             14/26 
Fehler: podman-3:3.4.4-1.fc35.x86_64: löschen übersprungen
Fehler: moby-engine-20.10.12-1.fc35.x86_64: löschen übersprungen
Fehler: containers-common-4:1-45.fc35.noarch: löschen übersprungen
Fehler: containerd-1.6.1-1.fc35.x86_64: löschen übersprungen
Fehler: runc-2:1.1.0-1.fc35.x86_64: löschen übersprungen
Fehler: conmon-2:2.1.0-2.fc35.x86_64: löschen übersprungen
Fehler: tpm2-abrmd-2.4.0-4.fc35.x86_64: löschen übersprungen
Fehler: swtpm-0.7.2-1.20220307git21c90c1.fc35.x86_64: löschen übersprungen
Fehler: snapd-2.54.4-1.fc35.x86_64: löschen übersprungen
Fehler: lxc-4.0.10-1.fc35.x86_64: löschen übersprungen
Fehler: flatpak-1.12.7-1.fc35.x86_64: löschen übersprungen

  Überprüfung läuft     : signal-desktop-5.37.0-1.fc36.x86_64              1/26 
  Überprüfung läuft     : signal-desktop-5.36.0-1.fc36.x86_64              2/26 
  Überprüfung läuft     : conmon-2:2.1.0-2.fc36.x86_64                     3/26 
  Überprüfung läuft     : conmon-2:2.1.0-2.fc35.x86_64                     4/26 
  Überprüfung läuft     : containerd-1.6.1-1.fc36.x86_64                   5/26 
  Überprüfung läuft     : containerd-1.6.1-1.fc35.x86_64                   6/26 
  Überprüfung läuft     : containers-common-4:1-53.fc36.noarch             7/26 
  Überprüfung läuft     : containers-common-4:1-45.fc35.noarch             8/26 
  Überprüfung läuft     : docker-compose-1.29.2-4.fc36.noarch              9/26 
  Überprüfung läuft     : docker-compose-1.29.2-3.fc35.noarch             10/26 
  Überprüfung läuft     : flatpak-1.12.7-1.fc36.x86_64                    11/26 
  Überprüfung läuft     : flatpak-1.12.7-1.fc35.x86_64                    12/26 
  Überprüfung läuft     : lxc-4.0.10-2.fc36.x86_64                        13/26 
  Überprüfung läuft     : lxc-4.0.10-1.fc35.x86_64                        14/26 
  Überprüfung läuft     : moby-engine-20.10.12-3.fc36.x86_64              15/26 
  Überprüfung läuft     : moby-engine-20.10.12-1.fc35.x86_64              16/26 
  Überprüfung läuft     : podman-3:4.0.2-1.fc36.x86_64                    17/26 
  Überprüfung läuft     : podman-3:3.4.4-1.fc35.x86_64                    18/26 
  Überprüfung läuft     : snapd-2.54.4-1.fc36.x86_64                      19/26 
  Überprüfung läuft     : snapd-2.54.4-1.fc35.x86_64                      20/26 
  Überprüfung läuft     : swtpm-0.7.2-1.20220307git21c90c1.fc36.x86_64    21/26 
  Überprüfung läuft     : swtpm-0.7.2-1.20220307git21c90c1.fc35.x86_64    22/26 
  Überprüfung läuft     : tpm2-abrmd-2.4.1-1.fc36.x86_64                  23/26 
  Überprüfung läuft     : tpm2-abrmd-2.4.0-4.fc35.x86_64                  24/26 
  Überprüfung läuft     : runc-2:1.1.1-1.fc36.x86_64                      25/26 
  Überprüfung läuft     : runc-2:1.1.0-1.fc35.x86_64                      26/26 

Aktualisiert:
  signal-desktop-5.37.0-1.fc36.x86_64                                           
Übersprungen:
  qownnotes-22.3.4-1.1.x86_64                                                   
  qt5-qtbase-5.15.3-1.fc36.x86_64                                               
  qt5-qtbase-common-5.15.3-1.fc36.noarch                                        
  qt5-qtbase-gui-5.15.3-1.fc36.x86_64                                           
  qt5-qtbase-gui-5.15.3-1.fc36.x86_64                                           
  qt5-qtwayland-5.15.3-1.fc36.x86_64                                            
  qt5-qtwebengine-5.15.8-5.fc36.x86_64                                          
  qt5-qtwebkit-5.212.0-0.63.alpha4.fc36.x86_64                                  
Fehlgeschlagen:
  conmon-2:2.1.0-2.fc35.x86_64                                                  
  conmon-2:2.1.0-2.fc36.x86_64                                                  
  containerd-1.6.1-1.fc35.x86_64                                                
  containerd-1.6.1-1.fc36.x86_64                                                
  containers-common-4:1-45.fc35.noarch                                          
  containers-common-4:1-53.fc36.noarch                                          
  docker-compose-1.29.2-3.fc35.noarch                                           
  docker-compose-1.29.2-4.fc36.noarch                                           
  flatpak-1.12.7-1.fc35.x86_64                                                  
  flatpak-1.12.7-1.fc36.x86_64                                                  
  lxc-4.0.10-1.fc35.x86_64                                                      
  lxc-4.0.10-2.fc36.x86_64                                                      
  moby-engine-20.10.12-1.fc35.x86_64                                            
  moby-engine-20.10.12-3.fc36.x86_64                                            
  podman-3:3.4.4-1.fc35.x86_64                                                  
  podman-3:4.0.2-1.fc36.x86_64                                                  
  runc-2:1.1.0-1.fc35.x86_64                                                    
  runc-2:1.1.1-1.fc36.x86_64                                                    
  snapd-2.54.4-1.fc35.x86_64                                                    
  snapd-2.54.4-1.fc36.x86_64                                                    
  swtpm-0.7.2-1.20220307git21c90c1.fc35.x86_64                                  
  swtpm-0.7.2-1.20220307git21c90c1.fc36.x86_64                                  
  tpm2-abrmd-2.4.0-4.fc35.x86_64                                                
  tpm2-abrmd-2.4.1-1.fc36.x86_64                                                

SELinux is preventing dnf from using the 'mac_admin' capabilities.

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

Wenn Sie denken, dass dnf standardmäßig mac_admin Berechtigung haben sollten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# ausearch -c 'dnf' --raw | audit2allow -M my-dnf
# semodule -X 300 -i my-dnf.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:unconfined_t:s0-
                              s0:c0.c1023
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-
                              s0:c0.c1023
Target Objects                Unbekannt [ capability2 ]
Source                        dnf
Source Path                   dnf
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-36.5-1.fc36.noarch
Local Policy RPM              selinux-policy-targeted-36.5-1.fc36.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.16.17-200.fc35.x86_64 #1 SMP
                              PREEMPT Wed Mar 23 15:44:17 UTC 2022 x86_64 x86_64
Alert Count                   72
First Seen                    2022-03-29 21:44:18 CEST
Last Seen                     2022-03-31 21:12:07 CEST
Local ID                      59e1bd67-cf93-4098-85ff-2c5b9615ddc4

Raw Audit Messages
type=AVC msg=audit(1648753927.496:2043): avc:  denied  { mac_admin } for  pid=183709 comm="dnf" capability=33  scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=capability2 permissive=0


Hash: dnf,unconfined_t,unconfined_t,capability2,mac_admin

Version-Release number of selected component:
selinux-policy-targeted-36.5-1.fc36.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.17.1
hashmarkername: setroubleshoot
kernel:         5.16.17-200.fc35.x86_64
type:           libreport

Potential duplicate: bug 1557350

Comment 1 Zdenek Pytela 2022-03-31 19:36:42 UTC
Seems the container and flatpak selinux modules are not properly installed and the types they provide are not active. Please show:

  # rpm -qa "*-selinux"
  # semodule -lfull | grep -v ^100

Comment 2 lray+redhatbugzilla 2022-04-01 07:03:55 UTC
Hi, please find the information below:

> rpm -qa "*-selinux" 

rpm-plugin-selinux-4.17.0-10.fc36.x86_64
snapd-selinux-2.54.4-1.fc36.noarch
tpm2-abrmd-selinux-2.3.1-5.fc36.noarch
container-selinux-2.181.0-1.fc36.noarch
flatpak-selinux-1.12.7-1.fc36.noarch

> sudo semodule -lfull | grep -v ^100 

300 my-chronyd        pp          
300 my-restorecon     pp          
300 my-runc           pp          
200 container         pp          
200 flatpak           pp          
200 snappy            pp          
200 swtpm             pp          
200 swtpm_svirt       pp          
200 tabrmd            pp

Comment 3 Daniel Walsh 2022-04-04 15:59:48 UTC
This is related to the file context problem.

dnf reinstall container-selinux

And see if it blows up.

Comment 4 lray+redhatbugzilla 2022-04-04 17:17:22 UTC
Hi Daniel,

yes, when reinstalling it, the same selinux alert is thrown

>sudo dnf reinstall container-selinux 

Letzte Prüfung auf abgelaufene Metadaten: vor 1:30:58 am Mo 04 Apr 2022 17:42:32 CEST.
Abhängigkeiten sind aufgelöst.
================================================================================
 Paket                Arch.     Version                Paketquelle        Größe
================================================================================
Neuinstallieren:
 container-selinux    noarch    2:2.181.0-1.fc36       updates-testing     49 k

Transaktionszusammenfassung
================================================================================

Gesamte Downloadgröße: 49 k
Installationsgröße: 54 k
Ist dies in Ordnung? [j/N]: j
Pakete werden heruntergeladen:
container-selinux-2.181.0-1.fc36.noarch.rpm                                                                                                                                                                    56 kB/s |  49 kB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Gesamt                                                                                                                                                                                                         24 kB/s |  49 kB     00:02     
Transaktionsüberprüfung wird ausgeführt
Transaktionsüberprüfung war erfolgreich.
Transaktion wird getestet
Transaktionstest war erfolgreich.
Transaktion wird ausgeführt
  Vorbereitung läuft    :                                                                                                                                                                                                                 1/1 
  Ausgeführtes Scriptlet: container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       1/2 
  Neuinstallieren       : container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       1/2 
  Ausgeführtes Scriptlet: container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       1/2 
Failed to resolve allow statement at /var/lib/selinux/targeted/tmp/modules/200/snappy/cil:305
Failed to resolve AST
/usr/sbin/semodule:  Failed!
/etc/selinux/targeted/contexts/files/file_contexts:  invalid context system_u:object_r:container_var_lib_t:s0

  Aufräumen             : container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       2/2 
  Ausgeführtes Scriptlet: container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       2/2 
  Überprüfung läuft     : container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       1/2 
  Überprüfung läuft     : container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       2/2 

Erneut installiert:
  container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                                                   

Fertig!

Comment 5 Daniel Walsh 2022-04-04 18:08:18 UTC
Could you remove snappy and container-selinux and then reinstall container-selinux and see if it works?
Then you should be able to re-add snappy.

Comment 6 lray+redhatbugzilla 2022-04-04 20:28:29 UTC
It still throws the error messages during the install

  Ausgeführtes Scriptlet: selinux-policy-36.5-1.fc36.noarch                                                                                                                                                                               2/8 
Failed to resolve typealiasactual statement at /var/lib/selinux/targeted/tmp/modules/200/container/cil:6
Failed to resolve AST
/usr/sbin/semodule:  Failed!

  Ausgeführtes Scriptlet: selinux-policy-targeted-36.5-1.fc36.noarch                                                                                                                                                                      3/8 
  Installieren          : selinux-policy-targeted-36.5-1.fc36.noarch                                                                                                                                                                      3/8 
  Ausgeführtes Scriptlet: selinux-policy-targeted-36.5-1.fc36.noarch                                                                                                                                                                      3/8 
Failed to resolve allow statement at /var/lib/selinux/targeted/tmp/modules/200/container/cil:1263
Failed to resolve AST
/usr/sbin/semodule:  Failed!

  Installieren          : flatpak-selinux-1.12.7-1.fc36.noarch                                                                                                                                                                            4/8 
  Ausgeführtes Scriptlet: flatpak-selinux-1.12.7-1.fc36.noarch                                                                                                                                                                            4/8 
Failed to resolve allow statement at /var/lib/selinux/targeted/tmp/modules/200/container/cil:1263
Failed to resolve AST
/usr/sbin/semodule:  Failed!

  Ausgeführtes Scriptlet: flatpak-1.12.7-1.fc36.x86_64                                                                                                                                                                                    5/8 
  Aktualisieren         : flatpak-1.12.7-1.fc36.x86_64                                                                                                                                                                                    5/8 
  Ausgeführtes Scriptlet: flatpak-1.12.7-1.fc36.x86_64                                                                                                                                                                                    5/8 
  Ausgeführtes Scriptlet: container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       6/8 
  Installieren          : container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       6/8 
  Ausgeführtes Scriptlet: container-selinux-2:2.181.0-1.fc36.noarch                                                                                                                                                                       6/8 
Failed to resolve allow statement at /var/lib/selinux/targeted/tmp/modules/200/container/cil:1263
Failed to resolve AST
Failed to commit changes to booleans: Success
Failed to resolve allow statement at /var/lib/selinux/targeted/tmp/modules/200/snappy/cil:305
Failed to resolve AST
/usr/sbin/semodule:  Failed!

  Ausgeführtes Scriptlet: tpm2-abrmd-selinux-2.3.1-5.fc36.noarch                                                                                                                                                                          7/8 
  Installieren          : tpm2-abrmd-selinux-2.3.1-5.fc36.noarch                                                                                                                                                                          7/8 
  Ausgeführtes Scriptlet: tpm2-abrmd-selinux-2.3.1-5.fc36.noarch                                                                                                                                                                          7/8 
Failed to resolve allow statement at /var/lib/selinux/targeted/tmp/modules/200/container/cil:1263
Failed to resolve AST
/usr/sbin/semodule:  Failed!

  Ausgeführtes Scriptlet: flatpak-1.12.7-1.fc35.x86_64                                                                                                                                                                                    8/8 
  Aufräumen             : flatpak-1.12.7-1.fc35.x86_64   

However, the selinux alert for mac_admin is not thrown again. :+1:

Comment 7 Daniel Walsh 2022-04-04 20:35:00 UTC
semodule -r container snappy flatpak

And then try.

Comment 8 lray+redhatbugzilla 2022-04-05 15:14:17 UTC
> sudo semodule -r container snappy flatpak                                            1 ↵  17:10:48   

libsemanage.semanage_direct_remove_key: Unable to remove module container at priority 400. (No such file or directory).
libsemanage.semanage_direct_remove_key: Unable to remove module snappy at priority 400. (No such file or directory).
libsemanage.semanage_direct_remove_key: Unable to remove module flatpak at priority 400. (No such file or directory).
semodule:  Failed!

Daniel, 

thanks for your support. Will stop investigating here - looks like this is not a common but a specific issue to me. As of this, no worries investing too much time into it IMO. 

Have a good time and cheers,
Lennart

Comment 9 Zdenek Pytela 2022-04-13 15:13:13 UTC
Hi snapd folks,

Every custom selinux module using directly or indirectly socket_class_set need to be rebuilt with

selinux-policy-35.17-1.fc35
https://bodhi.fedoraproject.org/updates/FEDORA-2022-c5bee6b70f

selinux-policy-34.27-1.fc34
https://bodhi.fedoraproject.org/updates/FEDORA-2022-eaef082697

to ensure these classes are not in use:
- bridge_socket
- ib_socket
- mpls_socket

Please do so before F36 GA.

Comment 10 Fedora Update System 2022-04-15 10:59:20 UTC
FEDORA-2022-c5bee6b70f has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-c5bee6b70f

Comment 11 Fedora Update System 2022-04-15 14:31:59 UTC
FEDORA-2022-c5bee6b70f has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-c5bee6b70f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-c5bee6b70f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2022-04-26 07:30:17 UTC
FEDORA-2022-c5bee6b70f has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.