Bug 2381605 - SELinux is preventing /usr/libexec/gdm-session-worker from 'getattr' accesses on the file /var/lib/lastlog/lastlog2.db.
Summary: SELinux is preventing /usr/libexec/gdm-session-worker from 'getattr' accesses...
Keywords:
Status: CLOSED DUPLICATE of bug 2379871
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6e22443a7a21f6054c8af3644f2...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-17 09:42 UTC by Mikhail
Modified: 2025-07-23 14:01 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-07-23 14:01:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (3.22 KB, text/plain)
2025-07-17 09:42 UTC, Mikhail
no flags Details
File: os_info (740 bytes, text/plain)
2025-07-17 09:42 UTC, Mikhail
no flags Details

Description Mikhail 2025-07-17 09:42:10 UTC
Description of problem:
SELinux is preventing /usr/libexec/gdm-session-worker from 'getattr' accesses on the file /var/lib/lastlog/lastlog2.db.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/var/lib/lastlog/lastlog2.db default label should be var_lib_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /var/lib/lastlog/lastlog2.db

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that gdm-session-worker should be allowed getattr access on the lastlog2.db 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 'gdm-session-wor' --raw | audit2allow -M my-gdmsessionwor
# semodule -X 300 -i my-gdmsessionwor.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:init_var_lib_t:s0
Target Objects                /var/lib/lastlog/lastlog2.db [ file ]
Source                        gdm-session-wor
Source Path                   /usr/libexec/gdm-session-worker
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gdm-49~alpha.1-1.fc43.x86_64
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-42.1-1.fc43.noarch
Local Policy RPM              selinux-policy-targeted-42.1-1.fc43.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 6.16.0-
                              0.rc6.250715g155a3c003e55.53.fc43.x86_64+debug #1
                              SMP PREEMPT_DYNAMIC Wed Jul 16 10:58:51 UTC 2025
                              x86_64
Alert Count                   22
First Seen                    2025-07-11 19:13:44 +05
Last Seen                     2025-07-17 13:03:38 +05
Local ID                      f5fa003a-4d4d-492f-9cd0-18a4ffa76c5f

Raw Audit Messages
type=AVC msg=audit(1752739418.283:368): avc:  denied  { getattr } for  pid=3417 comm="gdm-session-wor" path="/var/lib/lastlog/lastlog2.db" dev="nvme0n1p3" ino=158133466 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_lib_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1752739418.283:368): arch=x86_64 syscall=newfstatat success=yes exit=0 a0=ffffff9c a1=55b691f39c78 a2=7ffe17444960 a3=100 items=1 ppid=1856 pid=3417 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=gdm-session-wor exe=/usr/libexec/gdm-session-worker subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

type=CWD msg=audit(1752739418.283:368): cwd=/

type=PATH msg=audit(1752739418.283:368): item=0 name=/var/lib/lastlog/lastlog2.db inode=158133466 dev=00:23 mode=0100644 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:init_var_lib_t:s0 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0

Hash: gdm-session-wor,xdm_t,init_var_lib_t,file,getattr

Version-Release number of selected component:
selinux-policy-targeted-42.1-1.fc43.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing /usr/libexec/gdm-session-worker from 'getattr' accesses on the file /var/lib/lastlog/lastlog2.db.
package:        selinux-policy-targeted-42.1-1.fc43.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.16.0-0.rc6.250715g155a3c003e55.53.fc43.x86_64+debug
component:      selinux-policy

Comment 1 Mikhail 2025-07-17 09:42:13 UTC
Created attachment 2097460 [details]
File: description

Comment 2 Mikhail 2025-07-17 09:42:14 UTC
Created attachment 2097461 [details]
File: os_info

Comment 3 Adam Williamson (Red Hat non-Fedora) 2025-07-17 15:08:58 UTC
This, https://bugzilla.redhat.com/show_bug.cgi?id=2381604 and https://bugzilla.redhat.com/show_bug.cgi?id=2379871 are all pretty similar. openQA is hitting these on quite a lot of tests, bumping up our soft failure count.

Comment 4 Zdenek Pytela 2025-07-23 14:01:26 UTC

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


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