Bug 1419302 - SELinux is preventing sddm-greeter from 'execute' accesses on the file 2F7661722F6C69622F7364646D2F2333303531303331202864656C6574656429.
Summary: SELinux is preventing sddm-greeter from 'execute' accesses on the file 2F7661...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b844fe665b940cc542bb53192a3...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-05 02:09 UTC by Filipe Rosset
Modified: 2017-12-12 10:29 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:29:44 UTC
Type: ---


Attachments (Terms of Use)
Full strace of sddm-greeter showing the EACCES (54.46 KB, application/x-gzip)
2017-04-21 13:55 UTC, Tomáš Trnka
no flags Details

Description Filipe Rosset 2017-02-05 02:09:25 UTC
Description of problem:
SELinux is preventing sddm-greeter from 'execute' accesses on the file 2F7661722F6C69622F7364646D2F2333303531303331202864656C6574656429.

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

If você acredita que o sddm-greeter deva ser permitido acesso de execute em 2F7661722F6C69622F7364646D2F2333303531303331202864656C6574656429 file  por default.
Then você deve informar que este é um erro.
Você pode gerar um módulo de política local para permitir este acesso.
Do
allow this access for now by executing:
# ausearch -c 'sddm-greeter' --raw | audit2allow -M my-sddmgreeter
# semodule -X 300 -i my-sddmgreeter.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:xdm_var_lib_t:s0
Target Objects                2F7661722F6C69622F7364646D2F2333303531303331202864
                              656C6574656429 [ file ]
Source                        sddm-greeter
Source Path                   sddm-greeter
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.6.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.9.7-201.fc25.x86_64 #1 SMP Thu
                              Feb 2 23:32:42 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-02-05 00:06:32 BRST
Last Seen                     2017-02-05 00:06:32 BRST
Local ID                      98c02086-f8a3-4358-9e8b-f680192b175c

Raw Audit Messages
type=AVC msg=audit(1486260392.347:315): avc:  denied  { execute } for  pid=1240 comm="sddm-greeter" path=2F7661722F6C69622F7364646D2F2333303531303331202864656C6574656429 dev="sdb7" ino=3051031 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xdm_var_lib_t:s0 tclass=file permissive=0


Hash: sddm-greeter,xdm_t,xdm_var_lib_t,file,execute

Version-Release number of selected component:
selinux-policy-3.13.1-225.6.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.9.7-201.fc25.x86_64
type:           libreport

Comment 1 Tomáš Trnka 2017-04-21 13:52:58 UTC
Saw this today on my F25 machine:

type=AVC msg=audit(1492780056.064:5468): avc:  denied  { execute } for  pid=24253 comm="sddm-greeter" path=2F7661722F6C69622F7364646D2F233234393132383120286
4656C6574656429 dev="dm-0" ino=2491281 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xdm_var_lib_t:s0 tclass=file permissive=0
type=SYSCALL msg=audit(1492780056.064:5468): arch=c000003e syscall=9 success=no exit=-13 a0=0 a1=40000 a2=5 a3=1 items=0 ppid=24245 pid=24253 auid=429496729
5 uid=482 gid=999 euid=482 suid=482 fsuid=482 egid=999 sgid=999 fsgid=999 tty=(none) ses=4294967295 comm="sddm-greeter" exe="/usr/bin/sddm-greeter" subj=sys
tem_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)
type=PROCTITLE msg=audit(1492780056.064:5468): proctitle=2F7573722F62696E2F7364646D2D67726565746572002D2D736F636B6574002F746D702F7364646D2D3A302D6B707175445
6002D2D7468656D65002F7573722F73686172652F7364646D2F7468656D65732F30322D6665646F7261

After some debugging I've found out that sddm-greeter creates a temporary file in /var/lib/sddm/ (this is the long hex-encoded string) and tries to mmap it PROT_READ|PROT_EXEC. That triggers the denied execute AVC. The same thing is then retried with a file in /tmp/, where it succeeds. I thus have no idea if this has any real impact apart from spamming the logs. Given that the problematic access is surrounded by ioctls like DRM_IOCTL_NOUVEAU_GEM_NEW (see following strace), I'd guess this is related to Mesa/DRI/nouveau. However, I do not have time right now to debug this further.

open("/var/lib/sddm", O_RDWR|O_EXCL|O_DIRECTORY|O_TMPFILE, 0600) = 24
fstat(24, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
ftruncate(24, 262144)                   = 0
mmap(NULL, 262144, PROT_READ|PROT_EXEC, MAP_SHARED, 24, 0) = -1 EACCES (Permission denied)
close(24)                               = 0
open("/tmp", O_RDWR|O_EXCL|O_DIRECTORY|O_TMPFILE, 0600) = 24
fstat(24, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
ftruncate(24, 262144)                   = 0
mmap(NULL, 262144, PROT_READ|PROT_EXEC, MAP_SHARED, 24, 0) = 0x7f0dd4023000

Comment 2 Tomáš Trnka 2017-04-21 13:55:49 UTC
Created attachment 1273325 [details]
Full strace of sddm-greeter showing the EACCES

Comment 3 Fedora End Of Life 2017-11-16 18:32:32 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2017-12-12 10:29:44 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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