Bug 1612143 - the hsqldb service triggers SELinux denials
Summary: the hsqldb service triggers SELinux denials
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-03 15:06 UTC by Milos Malik
Modified: 2018-10-30 10:08 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-212.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:07:44 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 None None None 2018-10-30 10:08:09 UTC

Description Milos Malik 2018-08-03 15:06:54 UTC
Description of problem:
 * the hsqldb service stays running, but during its startup few SELinux denials are triggered

Version-Release number of selected component (if applicable):
hsqldb-1.8.1.3-14.el7.noarch
selinux-policy-3.13.1-210.el7.noarch
selinux-policy-devel-3.13.1-210.el7.noarch
selinux-policy-doc-3.13.1-210.el7.noarch
selinux-policy-minimum-3.13.1-210.el7.noarch
selinux-policy-mls-3.13.1-210.el7.noarch
selinux-policy-sandbox-3.13.1-210.el7.noarch
selinux-policy-targeted-3.13.1-210.el7.noarch

How reproducible:
 * always

Steps to Reproduce:
1. get a RHEL-7.6 machine (targeted policy is active)
2. start the hsqldb service
3. search for SELinux denials

Actual results (enforcing mode):
----
type=PROCTITLE msg=audit(08/03/2018 16:59:12.235:507) : proctitle=/usr/lib/jvm/jre/bin/java -Dsqltoolsprayer.rcfile=/var/lib/hsqldb/sqltool.rc -Dsqltoolsprayer.propfile=/var/lib/hsqldb/server.pr 
type=PATH msg=audit(08/03/2018 16:59:12.235:507) : item=0 name=/sys/fs/cgroup/memory/system.slice/hsqldb.service/memory.limit_in_bytes nametype=UNKNOWN cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=CWD msg=audit(08/03/2018 16:59:12.235:507) : cwd=/ 
type=SYSCALL msg=audit(08/03/2018 16:59:12.235:507) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f3decdc6af0 a1=O_RDONLY a2=0x1b6 a3=0x24 items=1 ppid=13943 pid=13982 auid=unset uid=hsqldb gid=hsqldb euid=hsqldb suid=hsqldb fsuid=hsqldb egid=hsqldb sgid=hsqldb fsgid=hsqldb tty=(none) ses=unset comm=java exe=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/bin/java subj=system_u:system_r:hsqldb_t:s0 key=(null) 
type=AVC msg=audit(08/03/2018 16:59:12.235:507) : avc:  denied  { search } for  pid=13982 comm=java name=/ dev="tmpfs" ino=8979 scontext=system_u:system_r:hsqldb_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir permissive=0 
----
type=PROCTITLE msg=audit(08/03/2018 16:59:12.235:508) : proctitle=/usr/lib/jvm/jre/bin/java -Dsqltoolsprayer.rcfile=/var/lib/hsqldb/sqltool.rc -Dsqltoolsprayer.propfile=/var/lib/hsqldb/server.pr 
type=MMAP msg=audit(08/03/2018 16:59:12.235:508) : fd=6 flags=MAP_SHARED 
type=SYSCALL msg=audit(08/03/2018 16:59:12.235:508) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0x8000 a2=PROT_READ|PROT_WRITE a3=MAP_SHARED items=0 ppid=13943 pid=13982 auid=unset uid=hsqldb gid=hsqldb euid=hsqldb suid=hsqldb fsuid=hsqldb egid=hsqldb sgid=hsqldb fsgid=hsqldb tty=(none) ses=unset comm=java exe=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/bin/java subj=system_u:system_r:hsqldb_t:s0 key=(null) 
type=AVC msg=audit(08/03/2018 16:59:12.235:508) : avc:  denied  { map } for  pid=13982 comm=java path=/tmp/hsperfdata_hsqldb/13982 dev="vda3" ino=835197 scontext=system_u:system_r:hsqldb_t:s0 tcontext=system_u:object_r:hsqldb_tmp_t:s0 tclass=file permissive=0 
----

Expected results:
 * no SELinux denials

Comment 1 Milos Malik 2018-08-03 15:11:47 UTC
Following SELinux denials appeared in permissive mode:
----
type=PROCTITLE msg=audit(08/03/2018 17:08:36.139:575) : proctitle=/usr/lib/jvm/jre/bin/java -Dhsqldb.method_class_names="" -classpath /var/lib/hsqldb/lib/hsqldb.jar org.hsqldb.util.MainInvoker o 
type=PATH msg=audit(08/03/2018 17:08:36.139:575) : item=0 name=/sys/fs/cgroup/memory/system.slice/hsqldb.service/memory.limit_in_bytes inode=8426 dev=00:22 mode=file,644 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:cgroup_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=CWD msg=audit(08/03/2018 17:08:36.139:575) : cwd=/var/lib/hsqldb 
type=SYSCALL msg=audit(08/03/2018 17:08:36.139:575) : arch=x86_64 syscall=open success=yes exit=3 a0=0x7fc4f08df950 a1=O_RDONLY a2=0x1b6 a3=0x24 items=1 ppid=1 pid=14431 auid=unset uid=hsqldb gid=hsqldb euid=hsqldb suid=hsqldb fsuid=hsqldb egid=hsqldb sgid=hsqldb fsgid=hsqldb tty=(none) ses=unset comm=java exe=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/bin/java subj=system_u:system_r:hsqldb_t:s0 key=(null) 
type=AVC msg=audit(08/03/2018 17:08:36.139:575) : avc:  denied  { open } for  pid=14431 comm=java path=/sys/fs/cgroup/memory/system.slice/hsqldb.service/memory.limit_in_bytes dev="cgroup" ino=8426 scontext=system_u:system_r:hsqldb_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1 
type=AVC msg=audit(08/03/2018 17:08:36.139:575) : avc:  denied  { read } for  pid=14431 comm=java name=memory.limit_in_bytes dev="cgroup" ino=8426 scontext=system_u:system_r:hsqldb_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1 
type=AVC msg=audit(08/03/2018 17:08:36.139:575) : avc:  denied  { search } for  pid=14431 comm=java name=/ dev="tmpfs" ino=8979 scontext=system_u:system_r:hsqldb_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir permissive=1 
----
type=PROCTITLE msg=audit(08/03/2018 17:08:36.139:576) : proctitle=/usr/lib/jvm/jre/bin/java -Dhsqldb.method_class_names="" -classpath /var/lib/hsqldb/lib/hsqldb.jar org.hsqldb.util.MainInvoker o 
type=SYSCALL msg=audit(08/03/2018 17:08:36.139:576) : arch=x86_64 syscall=fstat success=yes exit=0 a0=0x3 a1=0x7fc4f08df7a0 a2=0x7fc4f08df7a0 a3=0x0 items=0 ppid=1 pid=14431 auid=unset uid=hsqldb gid=hsqldb euid=hsqldb suid=hsqldb fsuid=hsqldb egid=hsqldb sgid=hsqldb fsgid=hsqldb tty=(none) ses=unset comm=java exe=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/bin/java subj=system_u:system_r:hsqldb_t:s0 key=(null) 
type=AVC msg=audit(08/03/2018 17:08:36.139:576) : avc:  denied  { getattr } for  pid=14431 comm=java path=/sys/fs/cgroup/memory/system.slice/hsqldb.service/memory.limit_in_bytes dev="cgroup" ino=8426 scontext=system_u:system_r:hsqldb_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1 
----
type=PROCTITLE msg=audit(08/03/2018 17:08:36.139:577) : proctitle=/usr/lib/jvm/jre/bin/java -Dhsqldb.method_class_names="" -classpath /var/lib/hsqldb/lib/hsqldb.jar org.hsqldb.util.MainInvoker o 
type=MMAP msg=audit(08/03/2018 17:08:36.139:577) : fd=6 flags=MAP_SHARED 
type=SYSCALL msg=audit(08/03/2018 17:08:36.139:577) : arch=x86_64 syscall=mmap success=yes exit=140483826290688 a0=0x0 a1=0x8000 a2=PROT_READ|PROT_WRITE a3=MAP_SHARED items=0 ppid=1 pid=14431 auid=unset uid=hsqldb gid=hsqldb euid=hsqldb suid=hsqldb fsuid=hsqldb egid=hsqldb sgid=hsqldb fsgid=hsqldb tty=(none) ses=unset comm=java exe=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/bin/java subj=system_u:system_r:hsqldb_t:s0 key=(null) 
type=AVC msg=audit(08/03/2018 17:08:36.139:577) : avc:  denied  { map } for  pid=14431 comm=java path=/tmp/hsperfdata_hsqldb/14431 dev="vda3" ino=835197 scontext=system_u:system_r:hsqldb_t:s0 tcontext=system_u:object_r:hsqldb_tmp_t:s0 tclass=file permissive=1 
----

Comment 5 errata-xmlrpc 2018-10-30 10:07:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3111


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