Bug 812094 - SELinux is preventing /usr/bin/totem-video-thumbnailer from 'setattr' accesses on the sock_file socket-4322-1804289383.
SELinux is preventing /usr/bin/totem-video-thumbnailer from 'setattr' accesse...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-04-12 14:15 EDT by Mirco Tischler
Modified: 2012-04-18 19:07 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.10.0-116.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-18 19:07:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mirco Tischler 2012-04-12 14:15:06 EDT
libreport version: 2.0.10
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.0-8.fc17.x86_64
time:           Do 12 Apr 2012 20:12:56 CEST

:SELinux is preventing /usr/bin/totem-video-thumbnailer from 'setattr' accesses on the sock_file socket-4322-1804289383.
:*****  Plugin catchall (100. confidence) suggests  ***************************
:If sie denken, dass totem-video-thumbnailer standardmässig erlaubt sein sollte, setattr Zugriff auf socket-4322-1804289383 sock_file zu erhalten.
:Then sie sollten dies als Fehler melden.
:Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
:zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
:# grep totem-video-thu /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023
:Target Context                unconfined_u:object_r:xdm_tmp_t:s0
:Target Objects                socket-4322-1804289383 [ sock_file ]
:Source                        totem-video-thu
:Source Path                   /usr/bin/totem-video-thumbnailer
:Port                          <Unbekannt>
:Host                          (removed)
:Source RPM Packages           totem-3.4.0-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-110.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.0-8.fc17.x86_64 #1 SMP Thu Mar 29
:                              18:18:26 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Do 12 Apr 2012 20:10:00 CEST
:Last Seen                     Do 12 Apr 2012 20:10:00 CEST
:Local ID                      d5f9ff37-f6ea-4136-a355-24c7b7139b55
:Raw Audit Messages
:type=AVC msg=audit(1334254200.611:335): avc:  denied  { setattr } for  pid=4322 comm="totem-video-thu" name="socket-4322-1804289383" dev="tmpfs" ino=3135140 scontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:xdm_tmp_t:s0 tclass=sock_file
:type=SYSCALL msg=audit(1334254200.611:335): arch=x86_64 syscall=chmod success=yes exit=0 a0=aee7a0 a1=1ff a2=1 a3=7fffccd25b8c items=0 ppid=1337 pid=4322 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=totem-video-thu exe=/usr/bin/totem-video-thumbnailer subj=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 key=(null)
:Hash: totem-video-thu,thumb_t,xdm_tmp_t,sock_file,setattr
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
Comment 1 Daniel Walsh 2012-04-12 17:13:53 EDT
Do you know if this tmp_t file was owned by totem or xdm?
Comment 2 Mirco Tischler 2012-04-13 09:09:30 EDT
If you mean file permissions, the file is owned by me, i.e. the user who used nautilus to browse to the directory containing the video files and thus triggering the execution of totem-video-thumbnailer.

What I probably should have added in the first place, there are followup alerts for write and remove_name accesses.

Also, this is 100% reproducible. I just have to create a new video file and browse to the directory containing it to trigger this.
Comment 3 Daniel Walsh 2012-04-13 12:07:53 EDT
Ok if it creates the socket than that is good.  I have checked in a fix to allow thumbnailers to create sockets in directories created by gdm.

Comment 4 Mirco Tischler 2012-04-13 16:22:41 EDT
Are you sure this is the right build? I downloaded it from koji and it doesn't fix the issue. But koji says it was build this morning, so before Comment 2 and there is no mention of the change in the changelog?
Comment 5 Daniel Walsh 2012-04-13 16:42:27 EDT
Maybe not.  Lets say it is fixed in selinux-policy-3.10.0-114.fc17.noarch

You could check if the fix was supposed to be in -114

grep -r xserver_xdm_tmp_filetrans /usr/share/selinux/devel/
Comment 6 Mirco Tischler 2012-04-13 17:01:45 EDT
That comes up empty.
Comment 7 Miroslav Grepl 2012-04-16 02:17:04 EDT
It is going to be fixed in selinux-policy-3.10.0-115.fc17
Comment 8 Fedora Update System 2012-04-16 17:28:25 EDT
selinux-policy-3.10.0-116.fc17 has been submitted as an update for Fedora 17.
Comment 9 Mirco Tischler 2012-04-18 10:43:49 EDT
116 fixes the problem. However, one related AVC still comes up, where totem-video-thumbnailer asks for setattr on the parent directory /tmp/at-spi2. I didn't realize this wasn't a duplicate of the originally reported message until now. Here's the audit line:

type=AVC msg=audit(1334757947.372:154): avc:  denied  { setattr } for  pid=5280 comm="totem-video-thu" name="at-spi2" dev="tmpfs" ino=85909 scontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xdm_tmp_t:s0 tclass=dir
Comment 10 Daniel Walsh 2012-04-18 16:50:31 EDT
Did everything work fine in enforcing mode, I guess we could dontaudit this one.
Comment 11 Fedora Update System 2012-04-18 19:07:43 EDT
selinux-policy-3.10.0-116.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

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