Bug 1960952 - SELinux is preventing asterisk from watch access on the file or lnk_file /etc/localtime.
Summary: SELinux is preventing asterisk from watch access on the file or lnk_file /etc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 34
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-16 18:48 UTC by Anthony Messina
Modified: 2021-05-28 22:41 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-34.8-1.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-28 00:59:49 UTC
Type: Bug


Attachments (Terms of Use)

Description Anthony Messina 2021-05-16 18:48:52 UTC
ausearch -m avc -ts recent | audit2allow


#============= asterisk_t ==============
allow asterisk_t locale_t:file watch;
allow asterisk_t locale_t:lnk_file watch;





Additional Information:
Source Context                system_u:system_r:asterisk_t:s0
Target Context                system_u:object_r:locale_t:s0
Target Objects                /etc/localtime [ lnk_file ]
Source                        asterisk
Source Path                   asterisk
Port                          <Unknown>
Source RPM Packages           
Target RPM Packages           systemd-248.2-1.fc34.x86_64
SELinux Policy RPM            selinux-policy-targeted-34.7-1.fc34.noarch
Local Policy RPM              selinux-policy-targeted-34.7-1.fc34.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Platform                      Linux host 5.11.20-300.fc34.x86_64
                              #1 SMP Wed May 12 12:45:10 UTC 2021 x86_64 x86_64
Alert Count                   2
First Seen                    2021-05-13 12:11:39 CDT
Last Seen                     2021-05-16 13:37:56 CDT
Local ID                      4133aa02-fc0c-4954-bceb-85fc12dbf7c3

Raw Audit Messages
type=AVC msg=audit(1621190276.779:1689): avc:  denied  { watch } for  pid=881 comm="asterisk" path="/etc/localtime" dev="sda3" ino=1610622239 scontext=system_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:locale_t:s0 tclass=lnk_file permissive=0


Hash: asterisk,asterisk_t,locale_t,lnk_file,watch






Additional Information:
Source Context                system_u:system_r:asterisk_t:s0
Target Context                system_u:object_r:locale_t:s0
Target Objects                /usr/share/zoneinfo/UTC [ file ]
Source                        asterisk
Source Path                   asterisk
Port                          <Unknown>
Source RPM Packages           
Target RPM Packages           tzdata-2021a-1.fc34.noarch
SELinux Policy RPM            selinux-policy-targeted-34.7-1.fc34.noarch
Local Policy RPM              selinux-policy-targeted-34.7-1.fc34.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Platform                      Linux host 5.11.20-300.fc34.x86_64
                              #1 SMP Wed May 12 12:45:10 UTC 2021 x86_64 x86_64
Alert Count                   5
First Seen                    2021-05-13 12:11:39 CDT
Last Seen                     2021-05-16 13:38:06 CDT
Local ID                      785fff1d-3401-4a78-a83e-c53b6daec508

Raw Audit Messages
type=AVC msg=audit(1621190286.809:1693): avc:  denied  { watch } for  pid=881 comm="asterisk" path="/usr/share/zoneinfo/UTC" dev="sda3" ino=536871336 scontext=system_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:locale_t:s0 tclass=file permissive=0


Hash: asterisk,asterisk_t,locale_t,file,watch

Comment 1 Zdenek Pytela 2021-05-17 15:12:50 UTC
I've submitted a Fedora PR to address the issue:
https://github.com/fedora-selinux/selinux-policy/pull/744

Comment 2 Fedora Update System 2021-05-24 09:16:27 UTC
FEDORA-2021-558e78822f has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-558e78822f

Comment 3 Fedora Update System 2021-05-25 02:27:18 UTC
FEDORA-2021-558e78822f has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-558e78822f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-558e78822f

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

Comment 4 Fedora Update System 2021-05-28 00:59:49 UTC
FEDORA-2021-558e78822f has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Anthony Messina 2021-05-28 22:41:36 UTC
https://bodhi.fedoraproject.org/updates/FEDORA-2021-558e78822f seems to fix the AVC with "lnk_file", but fails to fix the issue with "file":

AVC avc:  denied  { watch } for  pid=24138 comm="asterisk" path="/usr/share/zoneinfo/America/Chicago" dev="sda3" ino=427 scontext=system_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:locale_t:s0 tclass=file permissive=0


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