Bug 2143403 - SELinux is preventing hostname from 'read' accesses on the file disable_ipv6.
Summary: SELinux is preventing hostname from 'read' accesses on the file disable_ipv6.
Keywords:
Status: CLOSED DUPLICATE of bug 2143070
Alias: None
Product: Fedora
Classification: Fedora
Component: cockpit
Version: 37
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Pitt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4d3b908ecc1cad344d67d3ae79b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-16 20:51 UTC by Colin J Thomson
Modified: 2022-11-18 07:19 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-18 07:19:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Colin J Thomson 2022-11-16 20:51:19 UTC
Description of problem:
I started seeing this alert after changing my Hostname using the command "sudo hostnamectl set-hostname --static xxx"
SELinux is preventing hostname from 'read' accesses on the file disable_ipv6.

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

If you believe that hostname should be allowed read access on the disable_ipv6 file 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 'hostname' --raw | audit2allow -M my-hostname
# semodule -X 300 -i my-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                disable_ipv6 [ file ]
Source                        hostname
Source Path                   hostname
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-37.14-1.fc37.noarch
Local Policy RPM              cockpit-ws-279-1.fc37.x86_64
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.0.9-300.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Wed Nov 16 17:36:22 UTC 2022
                              x86_64 x86_64
Alert Count                   2
First Seen                    2022-11-16 20:21:45 GMT
Last Seen                     2022-11-16 20:21:45 GMT
Local ID                      dd47ba41-3955-47e0-a084-046223a91859

Raw Audit Messages
type=AVC msg=audit(1668630105.555:223): avc:  denied  { read } for  pid=1317 comm="hostname" name="disable_ipv6" dev="proc" ino=20412 scontext=system_u:system_r:cockpit_ws_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=0


Hash: hostname,cockpit_ws_t,sysctl_net_t,file,read

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

Additional info:
component:      cockpit
reporter:       libreport-2.17.4
hashmarkername: setroubleshoot
kernel:         6.0.9-300.fc37.x86_64
type:           libreport

Comment 1 Martin Pitt 2022-11-18 07:19:35 UTC
This is similar enough to #2143070 to treat it in one bugzilla. Thanks for reporting!

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


Note You need to log in before you can comment on or make changes to this bug.