Bug 2177273

Summary: SELinux is preventing .NET ThreadPool from 'watch' accesses on the Verzeichnis /sys.
Product: [Fedora] Fedora Reporter: Flo <augenauf>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA 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:eb73b33a05bfc11364e039d8931fc1874d05acef984a75fe958e8ab322dc107b;VARIANT_ID=workstation;
Fixed In Version: container-selinux-2.204.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-18 00:18:09 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-03-10 16:42:53 UTC
Description of problem:
could it be jellyfin related?
SELinux is preventing .NET ThreadPool from 'watch' accesses on the Verzeichnis /sys.

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

Wenn Sie denken, dass es .NET ThreadPool standardmäßig erlaubt sein sollte, watch Zugriff auf sys directory 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 '.NET ThreadPool' --raw | audit2allow -M my-NETThreadPool
# semodule -X 300 -i my-NETThreadPool.pp

Additional Information:
Source Context                system_u:system_r:container_t:s0:c9,c797
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                /sys [ dir ]
Source                        .NET ThreadPool
Source Path                   .NET ThreadPool
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-37.19-1.fc37.noarch
Local Policy RPM              selinux-policy-targeted-37.19-1.fc37.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.2.2-300.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Mar 3 16:25:21 UTC 2023 x86_64
                              x86_64
Alert Count                   1
First Seen                    2023-03-10 17:29:12 CET
Last Seen                     2023-03-10 17:29:12 CET
Local ID                      7b63b3da-ac0a-4c77-afe9-71d8d6f976e2

Raw Audit Messages
type=AVC msg=audit(1678465752.747:1125): avc:  denied  { watch } for  pid=33831 comm=2E4E455420546872656164506F6F6C path="/sys" dev="sysfs" ino=1 scontext=system_u:system_r:container_t:s0:c9,c797 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir permissive=0


Hash: .NET ThreadPool,container_t,sysfs_t,dir,watch

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

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

Comment 1 Daniel Walsh 2023-03-13 18:06:50 UTC
Fixed in container-selinux-2.204.0

Comment 2 Flo 2023-03-14 10:04:50 UTC
can anyone tell me if jellyfin in podman container (.NET ThreadPool) is supposed to get 'watch' accesses on directory /sys?

Comment 3 Fedora Update System 2023-03-14 10:56:59 UTC
FEDORA-2023-c68939dcbc has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c68939dcbc

Comment 4 Fedora Update System 2023-03-14 11:16:52 UTC
FEDORA-2023-8e2edb6abc has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-8e2edb6abc

Comment 5 Daniel Walsh 2023-03-14 21:29:30 UTC
I am fine with granting that access since it is just watching for files/directories to show up in a directory that it is currently allowed to list and read.

Comment 6 Fedora Update System 2023-03-15 01:47:31 UTC
FEDORA-2023-8e2edb6abc has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-8e2edb6abc`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-8e2edb6abc

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

Comment 7 Fedora Update System 2023-03-15 01:49:11 UTC
FEDORA-2023-c68939dcbc has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c68939dcbc

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

Comment 8 Fedora Update System 2023-03-18 00:18:09 UTC
FEDORA-2023-c68939dcbc has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2023-03-18 04:58:39 UTC
FEDORA-2023-8e2edb6abc has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.