RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2064688 - SELinux is preventing hostapd from 'sendto' accesses on the unix_dgram_socket /tmp/wpa_ctrl_439937-1.
Summary: SELinux is preventing hostapd from 'sendto' accesses on the unix_dgram_socket...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 9.1
Assignee: Zdenek Pytela
QA Contact: Milos Malik
Marc Muehlfeld
URL:
Whiteboard: abrt_hash:cf3791fa6666e8f75bed00cfa1a...
: 2068533 (view as bug list)
Depends On: 2032277 2064284
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-16 10:56 UTC by David Jaša
Modified: 2022-11-15 12:56 UTC (History)
14 users (show)

Fixed In Version: selinux-policy-34.1.30-2.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 2064284
Environment:
Last Closed: 2022-11-15 11:13:17 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2064284 1 medium CLOSED SELinux is preventing hostapd from 'sendto' accesses on the unix_dgram_socket /tmp/wpa_ctrl_439937-1. 2023-10-06 06:36:34 UTC
Red Hat Issue Tracker RHELPLAN-115725 0 None None None 2022-03-16 11:05:36 UTC
Red Hat Product Errata RHBA-2022:8283 0 None None None 2022-11-15 11:13:43 UTC

Comment 1 Zdenek Pytela 2022-03-16 11:36:45 UTC
Commits to backport:

commit 840881f91be518f6cb9ca294ea0122be6aca6af4
Author: Zdenek Pytela <zpytela>
Date:   Wed Jan 26 11:31:58 2022 +0100

    Allow hostapd talk with unconfined user over unix domain dgram socket

commit f0cb46186be7437cd78c96271938b3902cec10b7
Author: Zdenek Pytela <zpytela>
Date:   Wed Jan 26 10:54:36 2022 +0100

    Allow NetworkManager talk with unconfined user over unix domain dgram socket

Comment 2 Milos Malik 2022-03-16 13:26:01 UTC
Following SELinux denial appeared in enforcing mode:
----
type=PROCTITLE msg=audit(03/16/2022 08:54:13.640:332) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B 
type=PATH msg=audit(03/16/2022 08:54:13.640:332) : item=0 name=/tmp/wpa_ctrl_9342-1 inode=148542 dev=fd:01 mode=socket,755 ouid=root ogid=root rdev=00:00 obj=unconfined_u:object_r:user_tmp_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(03/16/2022 08:54:13.640:332) : cwd=/ 
type=SOCKADDR msg=audit(03/16/2022 08:54:13.640:332) : saddr={ saddr_fam=local path=/tmp/wpa_ctrl_9342-1 } 
type=SYSCALL msg=audit(03/16/2022 08:54:13.640:332) : arch=x86_64 syscall=sendto success=no exit=EACCES(Permission denied) a0=0xb a1=0x56535cd61a70 a2=0x0 a3=0x0 items=1 ppid=1 pid=9022 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(03/16/2022 08:54:13.640:332) : avc:  denied  { write } for  pid=9022 comm=hostapd name=wpa_ctrl_9342-1 dev="vda1" ino=148542 scontext=system_u:system_r:hostapd_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=sock_file permissive=0 
----

# rpm -qa selinux\* hostapd\* | sort
hostapd-2.10-1.el9.x86_64
selinux-policy-34.1.27-1.el9.noarch
selinux-policy-devel-34.1.27-1.el9.noarch
selinux-policy-targeted-34.1.27-1.el9.noarch
#

Comment 3 Milos Malik 2022-03-16 13:27:17 UTC
Following SELinux denials appeared in permissive mode:
----
type=PROCTITLE msg=audit(03/16/2022 09:26:28.668:343) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B 
type=PATH msg=audit(03/16/2022 09:26:28.668:343) : item=0 name=/tmp/wpa_ctrl_14559-1 inode=148542 dev=fd:01 mode=socket,755 ouid=root ogid=root rdev=00:00 obj=unconfined_u:object_r:user_tmp_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(03/16/2022 09:26:28.668:343) : cwd=/ 
type=SOCKADDR msg=audit(03/16/2022 09:26:28.668:343) : saddr={ saddr_fam=local path=/tmp/wpa_ctrl_14559-1 } 
type=SYSCALL msg=audit(03/16/2022 09:26:28.668:343) : arch=x86_64 syscall=sendto success=yes exit=0 a0=0xb a1=0x557fa90baa70 a2=0x0 a3=0x0 items=1 ppid=1 pid=14238 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(03/16/2022 09:26:28.668:343) : avc:  denied  { sendto } for  pid=14238 comm=hostapd path=/tmp/wpa_ctrl_14559-1 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 
type=AVC msg=audit(03/16/2022 09:26:28.668:343) : avc:  denied  { write } for  pid=14238 comm=hostapd name=wpa_ctrl_14559-1 dev="vda1" ino=148542 scontext=system_u:system_r:hostapd_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=sock_file permissive=1 
----

Comment 5 Zdenek Pytela 2022-03-25 17:36:40 UTC
*** Bug 2068533 has been marked as a duplicate of this bug. ***

Comment 16 Zdenek Pytela 2022-05-16 11:41:06 UTC
*** Bug 2068533 has been marked as a duplicate of this bug. ***

Comment 18 errata-xmlrpc 2022-11-15 11:13:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (selinux-policy bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8283


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