Bug 2166897

Summary: SELinux is preventing rpmdb_migrate from 'execute' accesses on the Datei /usr/bin/bash.
Product: [Fedora] Fedora Reporter: Flo <augenauf>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: dwalsh, lvrabec, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:356389441e7340650a62fcc4aa5583b1c4db664d06be6b9891929e773b756074;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-03 13:16:57 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:

Description Flo 2023-02-03 12:22:29 UTC
Description of problem:
this happens on a regular WS upgrade from f36 to f37, migration of rpm db is failing due to selinux
SELinux is preventing rpmdb_migrate from 'execute' accesses on the Datei /usr/bin/bash.

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

Wenn Sie denken, dass es rpmdb_migrate standardmäßig erlaubt sein sollte, execute Zugriff auf bash file zu erhalten.
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 'rpmdb_migrate' --raw | audit2allow -M my-rpmdbmigrate
# semodule -X 300 -i my-rpmdbmigrate.pp

Additional Information:
Source Context                system_u:system_r:rpmdb_t:s0
Target Context                system_u:object_r:shell_exec_t:s0
Target Objects                /usr/bin/bash [ file ]
Source                        rpmdb_migrate
Source Path                   rpmdb_migrate
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           bash-5.2.15-1.fc37.x86_64
SELinux Policy RPM            selinux-policy-targeted-37.18-1.fc37.noarch
Local Policy RPM              selinux-policy-targeted-37.18-1.fc37.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.1.8-200.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Tue Jan 24 20:32:16 UTC 2023
                              x86_64 x86_64
Alert Count                   1
First Seen                    2023-02-03 13:16:45 CET
Last Seen                     2023-02-03 13:16:45 CET
Local ID                      bcff9172-1ac0-4417-a786-db24ecfd6f2e

Raw Audit Messages
type=AVC msg=audit(1675426605.691:425): avc:  denied  { execute } for  pid=4861 comm="rpmdb_migrate" path="/usr/bin/bash" dev="dm-1" ino=2229696 scontext=system_u:system_r:rpmdb_t:s0 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file permissive=0


Hash: rpmdb_migrate,rpmdb_t,shell_exec_t,file,execute

Version-Release number of selected component:
selinux-policy-targeted-37.18-1.fc37.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.17.4
hashmarkername: setroubleshoot
kernel:         6.1.8-200.fc37.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2023-02-03 13:16:57 UTC

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