Bug 2274959 - SELinux is preventing uptime from 'read' accesses on the directory sessions.
Summary: SELinux is preventing uptime from 'read' accesses on the directory sessions.
Keywords:
Status: CLOSED DUPLICATE of bug 2270484
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 40
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f72874fb6159175c5f5df684869...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-14 06:22 UTC by Max M.
Modified: 2024-04-15 05:58 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-04-15 05:58:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (1.92 KB, text/plain)
2024-04-14 06:22 UTC, Max M.
no flags Details
File: os_info (653 bytes, text/plain)
2024-04-14 06:22 UTC, Max M.
no flags Details

Description Max M. 2024-04-14 06:22:15 UTC
Description of problem:
logwatch -> uptime
SELinux is preventing uptime from 'read' accesses on the directory sessions.

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

If you believe that uptime should be allowed read 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 'uptime' --raw | audit2allow -M my-uptime
# semodule -X 300 -i my-uptime.pp

Additional Information:
Source Context                system_u:system_r:logwatch_t:s0-s0:c0.c1023
Target Context                system_u:object_r:systemd_logind_sessions_t:s0
Target Objects                sessions [ dir ]
Source                        uptime
Source Path                   uptime
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.13-1.fc40.noarch
Local Policy RPM              selinux-policy-targeted-40.13-1.fc40.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.8.5-301.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Apr 11 20:00:10 UTC 2024
                              x86_64
Alert Count                   1
First Seen                    2024-04-14 03:17:05 CEST
Last Seen                     2024-04-14 03:17:05 CEST
Local ID                      f04cc690-2ea0-46b6-b2dc-79f5df9ab421

Raw Audit Messages
type=AVC msg=audit(1713057425.152:187): avc:  denied  { read } for  pid=27484 comm="uptime" name="sessions" dev="tmpfs" ino=91 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_logind_sessions_t:s0 tclass=dir permissive=0


Hash: uptime,logwatch_t,systemd_logind_sessions_t,dir,read

Version-Release number of selected component:
selinux-policy-targeted-40.13-1.fc40.noarch

Additional info:
reporter:       libreport-2.17.15
kernel:         6.8.5-301.fc40.x86_64
package:        selinux-policy-targeted-40.13-1.fc40.noarch
component:      selinux-policy
type:           libreport
hashmarkername: setroubleshoot
reason:         SELinux is preventing uptime from 'read' accesses on the directory sessions.
comment:        logwatch -> uptime
component:      selinux-policy

Comment 1 Max M. 2024-04-14 06:22:18 UTC
Created attachment 2026782 [details]
File: description

Comment 2 Max M. 2024-04-14 06:22:19 UTC
Created attachment 2026783 [details]
File: os_info

Comment 3 Milos Malik 2024-04-14 06:55:14 UTC
This bug is a duplicate of BZ#2270484.

Comment 4 Zdenek Pytela 2024-04-15 05:58:28 UTC

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


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