Bug 968193 - SELinux is preventing systemd-journal from 'use' accesses on the fd fd.
SELinux is preventing systemd-journal from 'use' accesses on the fd fd.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:f4b8ce48a0a5f903373d276916b...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-29 04:06 EDT by Moez Roy
Modified: 2013-06-07 23:33 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-48.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-07 23:33:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Moez Roy 2013-05-29 04:06:14 EDT
Description of problem:
SELinux is preventing systemd-journal from 'use' accesses on the fd fd.

*****  Plugin catchall_boolean (89.3 confidence) suggests  *******************

If you want to allow all domains to use other domains file descriptors
Then you must tell SELinux about this by enabling the 'domain_fd_use' boolean.
You can read 'kernel_selinux' man page for more details.
Do
setsebool -P domain_fd_use 1

*****  Plugin catchall (11.6 confidence) suggests  ***************************

If you believe that systemd-journal should be allowed use access on the fd fd 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 systemd-journal /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:syslogd_t:s0
Target Context                system_u:system_r:kernel_t:s0
Target Objects                fd [ fd ]
Source                        systemd-journal
Source Path                   systemd-journal
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-204-3.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-44.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.4-300.fc19.x86_64 #1 SMP Fri
                              May 24 22:17:06 UTC 2013 x86_64 x86_64
Alert Count                   6
First Seen                    2013-05-29 04:01:10 EDT
Last Seen                     2013-05-29 04:01:10 EDT
Local ID                      e6de64d7-5e90-4511-857b-c41600a7c51b

Raw Audit Messages
type=AVC msg=audit(1369814470.356:654): avc:  denied  { use } for  pid=3138 comm="systemd-journal" path="socket:[6487]" dev="sockfs" ino=6487 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=fd


type=AVC msg=audit(1369814470.356:654): avc:  denied  { use } for  pid=3138 comm="systemd-journal" path="socket:[6490]" dev="sockfs" ino=6490 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=fd


type=AVC msg=audit(1369814470.356:654): avc:  denied  { use } for  pid=3138 comm="systemd-journal" path="socket:[6492]" dev="sockfs" ino=6492 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=fd


type=SYSCALL msg=audit(1369814470.356:654): arch=x86_64 syscall=execve success=yes exit=0 a0=7f8dab948990 a1=7f8dab913220 a2=7f8dabb81fe0 a3=6c616e72756f6a2d items=0 ppid=1 pid=3138 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-journal exe=/usr/lib/systemd/systemd-journald subj=system_u:system_r:syslogd_t:s0 key=(null)

Hash: systemd-journal,syslogd_t,kernel_t,fd,use

Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-300.fc19.x86_64
type:           libreport

Potential duplicate: bug 955389
Comment 1 Daniel Walsh 2013-05-29 17:07:24 EDT
*****  Plugin catchall_boolean (89.3 confidence) suggests  *******************

If you want to allow all domains to use other domains file descriptors
Then you must tell SELinux about this by enabling the 'domain_fd_use' boolean.
You can read 'kernel_selinux' man page for more details.
Do
setsebool -P domain_fd_use 1

Did you disable this?
Comment 2 Moez Roy 2013-05-29 20:51:52 EDT
(In reply to Daniel Walsh from comment #1)
> *****  Plugin catchall_boolean (89.3 confidence) suggests 
> *******************
> 
> If you want to allow all domains to use other domains file descriptors
> Then you must tell SELinux about this by enabling the 'domain_fd_use'
> boolean.
> You can read 'kernel_selinux' man page for more details.
> Do
> setsebool -P domain_fd_use 1
> 
> Did you disable this?

Yes, I disabled all the booleans to make my system more secure.

But then I had to re-enable this.

What does "If you want to allow all domains to use other domains file descriptors" mean? And why does systemd-journal want it to be enabled?
Comment 3 Daniel Walsh 2013-06-04 16:40:59 EDT
Fixed in selinux-policy-3.12.1-48.fc19.noarch

This should be fixed with the boolean disabled.

Basically this allows one confined domains to use an FD that was leaked to it by another process.

In this case we do want to allow this by default.  When a system boots up all processes are running as kernel_t, including the process that opens up the syslog socket,  systemd then leaks this open file descriptor to sysgtemd-journald, and systemd-journald can then use it.
Comment 4 Fedora Update System 2013-06-05 15:00:47 EDT
selinux-policy-3.12.1-48.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-48.fc19
Comment 5 Fedora Update System 2013-06-06 13:30:53 EDT
Package selinux-policy-3.12.1-48.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-48.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10204/selinux-policy-3.12.1-48.fc19
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-06-07 23:33:03 EDT
selinux-policy-3.12.1-48.fc19 has been pushed to the Fedora 19 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.