Bug 2144606

Summary: SELinux is preventing hostname from 'search' accesses on the carpeta net.
Product: [Fedora] Fedora Reporter: Francisco de la Peña <fran>
Component: cockpitAssignee: Martin Pitt <mpitt>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: dperpeet, dwalsh, grepl.miroslav, lvrabec, mmalik, mmarusak, mpitt, omosnacek, patrick, pkoncity, pvolpe, stefw, user-cont-team+packit-fas, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7a2a32e3cadd922dea67f79c4bf90c57e9177192c7f09fe4ffea723b2a9ef572;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-06 11:00:20 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 Francisco de la Peña 2022-11-21 20:33:08 UTC
Description of problem:
SELinux is preventing hostname from 'search' accesses on the carpeta net.

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

Si cree que de manera predeterminada se debería permitir a hostname el acceso search sobre  net directory.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso temporalmente ejecutando:
# ausearch -c 'hostname' --raw | audit2allow -M mi-hostname
# semodule -X 300 -i mi-hostname.pp

Additional Information:
Source Context                system_u:system_r:cockpit_ws_t:s0
Target Context                system_u:object_r:sysctl_net_t:s0
Target Objects                net [ dir ]
Source                        hostname
Source Path                   hostname
Port                          <Desconocido>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-37.14-1.fc37.noarch
Local Policy RPM              selinux-policy-targeted-37.14-1.fc37.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.0.8-300.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Nov 11 15:09:04 UTC 2022
                              x86_64 x86_64
Alert Count                   2
First Seen                    2022-11-21 13:25:28 CST
Last Seen                     2022-11-21 13:25:28 CST
Local ID                      48a760a1-64fe-41ab-89c2-03369050d17d

Raw Audit Messages
type=AVC msg=audit(1669058728.974:236): avc:  denied  { search } for  pid=1284 comm="hostname" name="net" dev="proc" ino=1443 scontext=system_u:system_r:cockpit_ws_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=0


Hash: hostname,cockpit_ws_t,sysctl_net_t,dir,search

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

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

Comment 1 Martin Pitt 2023-06-06 11:00:20 UTC

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