Bug 981983 - SELinux is preventing /usr/sbin/sedispatch from 'write' accesses on the sock_file log.
Summary: SELinux is preventing /usr/sbin/sedispatch from 'write' accesses on the sock_...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:9a2d09331c2238887957b06e455...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-07 14:12 UTC by Igor Gnatenko
Modified: 2013-07-30 12:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-26 16:42:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Igor Gnatenko 2013-07-07 14:12:00 UTC
Description of problem:
# vzctl create 101 centos-6-x86_64
# vzctl start 101
nothig more
SELinux is preventing /usr/sbin/sedispatch from 'write' accesses on the sock_file log.

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

If you believe that sedispatch should be allowed write access on the log sock_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:
# grep sedispatch /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:audisp_t:s0
Target Context                unconfined_u:object_r:device_t:s0
Target Objects                log [ sock_file ]
Source                        sedispatch
Source Path                   /usr/sbin/sedispatch
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           setroubleshoot-server-3.2.10-1.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-59.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.9-301.fc19.x86_64 #1 SMP Thu
                              Jul 4 15:10:36 UTC 2013 x86_64 x86_64
Alert Count                   626
First Seen                    2013-07-07 18:02:08 MSK
Last Seen                     2013-07-07 18:05:36 MSK
Local ID                      7e842cf6-81db-4576-b440-f5791ef235d6

Raw Audit Messages
type=AVC msg=audit(1373205936.67:236327): avc:  denied  { write } for  pid=311 comm="sedispatch" name="log" dev="devtmpfs" ino=925088 scontext=system_u:system_r:audisp_t:s0 tcontext=unconfined_u:object_r:device_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1373205936.67:236327): arch=x86_64 syscall=connect success=no exit=EACCES a0=4 a1=3abedbc740 a2=6e a3=202c746f6f687365 items=0 ppid=308 pid=311 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=sedispatch exe=/usr/sbin/sedispatch subj=system_u:system_r:audisp_t:s0 key=(null)

Hash: sedispatch,audisp_t,device_t,sock_file,write

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.9-301.fc19.x86_64
type:           libreport

Potential duplicate: bug 690340

Comment 1 Daniel Walsh 2013-07-08 19:11:26 UTC
Somehow /dev/log got mislabeled?  Where you running syslog tools by hand?

Comment 2 Daniel Walsh 2013-07-08 19:11:54 UTC
restorecon -v /dev/log

Will fix.

Comment 3 Igor Gnatenko 2013-07-20 13:08:24 UTC
restorecon:  lstat(/dev/log) failed:  No such file or directory

Comment 4 Daniel Walsh 2013-07-22 14:02:45 UTC
If you don't have a /dev/log you have greater problems than SELinux issues.

/dev/log should be on every system.

Comment 5 Igor Gnatenko 2013-07-22 14:09:16 UTC
(In reply to Daniel Walsh from comment #4)
> If you don't have a /dev/log you have greater problems than SELinux issues.
> 
> /dev/log should be on every system.
I have fresh install of Fedora 19.

Comment 6 Miroslav Grepl 2013-07-26 11:38:51 UTC
Are you up-to-date? Did you install it from LiveCD?

Comment 7 Igor Gnatenko 2013-07-26 11:51:03 UTC
(In reply to Miroslav Grepl from comment #6)
> Are you up-to-date? Did you install it from LiveCD?
Yes. I've used netinst

Comment 8 Daniel Walsh 2013-07-26 16:42:19 UTC
This is caused by a bug in openvz which is deleteing the /dev/log socket.

Comment 9 Kirill Kolyshkin 2013-07-30 01:03:07 UTC
For the readers of this bug -- here's a relevant OpenVZ bug filed: https://bugzilla.openvz.org/show_bug.cgi?id=2690

Nevertheless, to my best knowledge OpenVZ is not doing anything at all with /dev/log.

Comment 10 Daniel Walsh 2013-07-30 12:04:04 UTC
Well something is.


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