Bug 1928549 - SELinux is preventing gnome-session-b from 'watch' accesses on the directory /run/systemd/sessions.
Summary: SELinux is preventing gnome-session-b from 'watch' accesses on the directory ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 34
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f62581c4d4973bbc31c5a0033f6...
: 1928561 1941670 (view as bug list)
Depends On:
Blocks: 1939027
TreeView+ depends on / blocked
 
Reported: 2021-02-14 20:13 UTC by Mikhail
Modified: 2021-09-09 15:30 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-09 15:30:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikhail 2021-02-14 20:13:20 UTC
Description of problem:
SELinux is preventing gnome-session-b from 'watch' accesses on the directory /run/systemd/sessions.

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

If you believe that gnome-session-b should be allowed watch access on the sessions directory 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 'gnome-session-b' --raw | audit2allow -M my-gnomesessionb
# semodule -X 300 -i my-gnomesessionb.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:systemd_logind_sessions_t:s0
Target Objects                /run/systemd/sessions [ dir ]
Source                        gnome-session-b
Source Path                   gnome-session-b
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.8-1.fc35.noarch
Local Policy RPM              selinux-policy-targeted-3.14.8-1.fc35.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.11.0-0.rc7.20210212git291009f656
                              e8.151.fc35.x86_64 #1 SMP Fri Feb 12 13:02:28 UTC
                              2021 x86_64 x86_64
Alert Count                   7
First Seen                    2021-02-15 01:01:36 +05
Last Seen                     2021-02-15 01:04:22 +05
Local ID                      f966fd7b-b1ad-4e6c-9f4a-0142d2d7f04c

Raw Audit Messages
type=AVC msg=audit(1613333062.691:561): avc:  denied  { watch } for  pid=1580 comm="gnome-shell" path="/run/systemd/sessions" dev="tmpfs" ino=78 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_logind_sessions_t:s0 tclass=dir permissive=1


Hash: gnome-session-b,xdm_t,systemd_logind_sessions_t,dir,watch

Version-Release number of selected component:
selinux-policy-targeted-3.14.8-1.fc35.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.11.0-0.rc7.20210212git291009f656e8.151.fc35.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2021-03-19 07:36:46 UTC
*** Bug 1928561 has been marked as a duplicate of this bug. ***

Comment 2 Zdenek Pytela 2021-03-19 07:39:56 UTC
I've submitted a Fedora PR to address the issue:
https://github.com/fedora-selinux/selinux-policy/pull/648

Comment 3 Zdenek Pytela 2021-03-22 17:40:19 UTC
*** Bug 1941670 has been marked as a duplicate of this bug. ***


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