Bug 1891152 - SELinux is preventing hostapd from 'write' accesses on the sock_file wpa_ctrl_285579-1.
Summary: SELinux is preventing hostapd from 'write' accesses on the sock_file wpa_ctrl...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 32
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b900c093c926c817fea151f2933...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-23 22:55 UTC by Doncho Gunchev
Modified: 2022-03-17 07:27 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-05-25 16:55:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Doncho Gunchev 2020-10-23 22:55:22 UTC
Description of problem:
I configured and started hostapd. After that started hostapd_cli and the error popped up.
SELinux is preventing hostapd from 'write' accesses on the sock_file wpa_ctrl_285579-1.

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

If you believe that hostapd should be allowed write access on the wpa_ctrl_285579-1 sock_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 'hostapd' --raw | audit2allow -M my-hostapd
# semodule -X 300 -i my-hostapd.pp

Additional Information:
Source Context                system_u:system_r:hostapd_t:s0
Target Context                unconfined_u:object_r:user_tmp_t:s0
Target Objects                wpa_ctrl_285579-1 [ sock_file ]
Source                        hostapd
Source Path                   hostapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.5-44.fc32.noarch
Local Policy RPM              selinux-policy-targeted-3.14.5-44.fc32.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.8.15-201.fc32.x86_64 #1 SMP Thu
                              Oct 15 15:56:44 UTC 2020 x86_64 x86_64
Alert Count                   3
First Seen                    2020-10-24 01:51:37 EEST
Last Seen                     2020-10-24 01:53:17 EEST
Local ID                      b2f49805-dd40-4304-a977-d56f80eed6bf

Raw Audit Messages
type=AVC msg=audit(1603493597.745:5008): avc:  denied  { write } for  pid=285456 comm="hostapd" name="wpa_ctrl_285579-1" dev="tmpfs" ino=16567214 scontext=system_u:system_r:hostapd_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=sock_file permissive=1


Hash: hostapd,hostapd_t,user_tmp_t,sock_file,write

Version-Release number of selected component:
selinux-policy-targeted-3.14.5-44.fc32.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.13.1
hashmarkername: setroubleshoot
kernel:         5.8.15-201.fc32.x86_64
type:           libreport

Comment 1 Doncho Gunchev 2020-10-24 07:45:10 UTC
Also:

SELinux is preventing hostapd from sendto access on the unix_dgram_socket /tmp/wpa_ctrl_285579-2.

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

If you believe that hostapd should be allowed sendto access on the wpa_ctrl_285579-2 unix_dgram_socket 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 'hostapd' --raw | audit2allow -M my-hostapd
# semodule -X 300 -i my-hostapd.pp

Additional Information:
Source Context                system_u:system_r:hostapd_t:s0
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                /tmp/wpa_ctrl_285579-2 [ unix_dgram_socket ]
Source                        hostapd
Source Path                   hostapd
Port                          <Unknown>
Host                          pc1.c00l.lan
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.5-44.fc32.noarch
Local Policy RPM              selinux-policy-targeted-3.14.5-44.fc32.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     pc1.c00l.lan
Platform                      Linux pc1.c00l.lan 5.8.15-201.fc32.x86_64 #1 SMP
                              Thu Oct 15 15:56:44 UTC 2020 x86_64 x86_64
Alert Count                   5
First Seen                    2020-10-24 01:51:37 EEST
Last Seen                     2020-10-24 01:58:13 EEST
Local ID                      01fab95e-1632-41f9-b251-e6d53bc8e0f0

Raw Audit Messages
type=AVC msg=audit(1603493893.15:5020): avc:  denied  { sendto } for  pid=285456 comm="hostapd" path="/tmp/wpa_ctrl_285579-2" scontext=system_u:system_r:hostapd_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_dgram_socket permissive=1


Hash: hostapd,hostapd_t,unconfined_t,unix_dgram_socket,sendto

Comment 2 Fedora Program Management 2021-04-29 16:42:14 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
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
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Ben Cotton 2021-05-25 16:55:48 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 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. If you experience problems, please add a comment to this
bug.

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


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