Bug 2298663

Summary: SELinux is preventing systemd-coredum from 'read' accesses on the file labeled nsfs_t.
Product: [Fedora] Fedora Reporter: Nightly <5535krisi+bugzilla.redhat.com>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 40CC: 5535krisi+bugzilla.redhat.com, dwalsh, lvrabec, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:4440fe5b99e13cc16f4f2708a4602b47450405bf5ab792af3c91dbb7ce4476c2;VARIANT_ID=;
Fixed In Version: selinux-policy-40.26-1.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-07-30 01:32:42 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:
Attachments:
Description Flags
File: description
none
File: os_info none

Description Nightly 2024-07-18 12:22:11 UTC
Description of problem:
I used `systemd-nspawn -b -D /mnt/gentoo` to chroot into a Gentoo SystemD 23.0 installation, after that I recompiled gzip with the `static` USE flag enabled.
SELinux is preventing systemd-coredum from 'read' accesses on the file labeled nsfs_t.

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

If you believe that systemd-coredum should be allowed read access on file labeled nsfs_t 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 'systemd-coredum' --raw | audit2allow -M my-systemdcoredum
# semodule -X 300 -i my-systemdcoredum.pp

Additional Information:
Source Context                system_u:system_r:systemd_coredump_t:s0
Target Context                system_u:object_r:nsfs_t:s0
Target Objects                Unknown [ file ]
Source                        systemd-coredum
Source Path                   systemd-coredum
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.23-1.fc40.noarch
Local Policy RPM              selinux-policy-targeted-40.23-1.fc40.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.9.9-200_tkg.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC TKG Fri Jul 12 11:28:39 UTC 2024
                              x86_64
Alert Count                   1
First Seen                    2024-07-18 15:00:36 EEST
Last Seen                     2024-07-18 15:00:36 EEST
Local ID                      9ef2b60f-2a21-407a-a956-76427295be03

Raw Audit Messages
type=AVC msg=audit(1721304036.281:304): avc:  denied  { read } for  pid=110516 comm="systemd-coredum" dev="nsfs" ino=4026533523 scontext=system_u:system_r:systemd_coredump_t:s0 tcontext=system_u:object_r:nsfs_t:s0 tclass=file permissive=0


Hash: systemd-coredum,systemd_coredump_t,nsfs_t,file,read

Version-Release number of selected component:
selinux-policy-targeted-40.23-1.fc40.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing systemd-coredum from 'read' accesses on the file labeled nsfs_t.
package:        selinux-policy-targeted-40.23-1.fc40.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.9.9-200_tkg.fc40.x86_64
comment:        I used `systemd-nspawn -b -D /mnt/gentoo` to chroot into a Gentoo SystemD 23.0 installation, after that I recompiled gzip with the `static` USE flag enabled.
component:      selinux-policy

Comment 1 Nightly 2024-07-18 12:22:13 UTC
Created attachment 2039849 [details]
File: description

Comment 2 Nightly 2024-07-18 12:22:15 UTC
Created attachment 2039850 [details]
File: os_info

Comment 3 Fedora Update System 2024-07-23 14:44:07 UTC
FEDORA-2024-391cfa58c2 (selinux-policy-40.25-1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-391cfa58c2

Comment 4 Fedora Update System 2024-07-24 03:51:17 UTC
FEDORA-2024-391cfa58c2 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-391cfa58c2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-391cfa58c2

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

Comment 5 Fedora Update System 2024-07-26 01:58:56 UTC
FEDORA-2024-f6d12d5c36 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-f6d12d5c36`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-f6d12d5c36

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

Comment 6 Fedora Update System 2024-07-30 01:32:42 UTC
FEDORA-2024-f6d12d5c36 (selinux-policy-40.26-1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.