Bug 1889640

Summary: SELinux is preventing postmaster from 'remove_name' accesses on the directory db_0.tmp.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 34CC: dwalsh, grepl.miroslav, lvrabec, mmalik, plautrba, vmojzis, zpytela
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1b17150b48b368bcc93d219b732f06795a437ef11ea97b6db06df7bf4c46a2ea;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-08 06:20:11 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 Mikhail 2020-10-20 09:19:09 UTC
Description of problem:
SELinux is preventing postmaster from 'remove_name' accesses on the directory db_0.tmp.

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

If you believe that postmaster should be allowed remove_name access on the db_0.tmp directory 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 'postmaster' --raw | audit2allow -M my-postmaster
# semodule -X 300 -i my-postmaster.pp

Additional Information:
Source Context                system_u:system_r:postgresql_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                db_0.tmp [ dir ]
Source                        postmaster
Source Path                   postmaster
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.7-5.fc34.noarch
Local Policy RPM              selinux-policy-targeted-3.14.7-5.fc34.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.10.0-0.rc0.20201014gitb5fc7a89e5
                              8b.42.fc34.x86_64 #1 SMP Fri Oct 16 18:24:40 +05
                              2020 x86_64 x86_64
Alert Count                   12
First Seen                    2020-10-20 14:11:29 +05
Last Seen                     2020-10-20 14:17:27 +05
Local ID                      d666c7c1-4a19-4a12-9be7-c60f6e9c462a

Raw Audit Messages
type=AVC msg=audit(1603185447.806:1801): avc:  denied  { remove_name } for  pid=112490 comm="postmaster" name="db_0.tmp" dev="sda" ino=143139694 scontext=system_u:system_r:postgresql_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir permissive=1


Hash: postmaster,postgresql_t,user_home_t,dir,remove_name

Version-Release number of selected component:
selinux-policy-targeted-3.14.7-5.fc34.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.10.0-0.rc0.20201014gitb5fc7a89e58b.42.fc34.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2020-10-20 10:06:36 UTC
Mikhail,

Can you locate the file path? What exactly were the steps triggering this AVC denial?

Comment 2 Ben Cotton 2021-02-09 16:26:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 3 Ben Cotton 2022-05-12 16:49:17 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
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 '34'.

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.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 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.

Comment 4 Ben Cotton 2022-06-08 06:20:11 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 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 please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 5 Red Hat Bugzilla 2023-09-15 01:31:00 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days