We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is avc denial for apache trying to bind port 10080 (aka amanda port) on Tendrl Server machine.
# rpm -qa | grep selinux | sort carbon-selinux-1.5.3-20171013T090621.ffb1b7f.noarch libselinux-2.5-11.el7.x86_64 libselinux-python-2.5-11.el7.x86_64 libselinux-utils-2.5-11.el7.x86_64 selinux-policy-3.13.1-166.el7_4.4.noarch selinux-policy-targeted-3.13.1-166.el7_4.4.noarch tendrl-grafana-selinux-1.5.3-20171013T090621.ffb1b7f.noarch tendrl-selinux-1.5.3-20171013T090621.ffb1b7f.noarch
# rpm -qa | grep tendrl | sort tendrl-api-1.5.3-20171013T082716.a2f3b3f.noarch tendrl-api-httpd-1.5.3-20171013T082716.a2f3b3f.noarch tendrl-commons-1.5.3-20171013T081843.c73101a.noarch tendrl-grafana-plugins-1.5.3-20171016T100950.e8eb6c8.noarch tendrl-grafana-selinux-1.5.3-20171013T090621.ffb1b7f.noarch tendrl-monitoring-integration-1.5.3-20171016T100950.e8eb6c8.noarch tendrl-node-agent-1.5.3-20171016T094453.4aa81f7.noarch tendrl-notifier-1.5.3-20171011T200310.3c01717.noarch tendrl-selinux-1.5.3-20171013T090621.ffb1b7f.noarch tendrl-ui-1.5.3-20171013T082611.6e08356.noarch
ausearch -m avc
Note: step 2 means that I'm using SELinux targetted policy in permissive mode, with all tendrl selinux packages installed.
In audit logs, there is the following SELinux denial:
# ausearch -m avc ---- time->Mon Oct 16 11:15:19 2017 type=PROCTITLE msg=audit(1508152519.031:5036): proctitle=2F7573722F7362696E2F6874747064002D44464F524547524F554E44 type=SYSCALL msg=audit(1508152519.031:5036): arch=c000003e syscall=49 success=yes exit=0 a0=6 a1=55b796c3b3a8 a2=1c a3=7ffff139e42c items=0 ppid=1 pid=11057 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(1508152519.031:5036): avc: denied { name_bind } for pid=11057 comm="httpd" src=10080 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:amanda_port_t:s0 tclass=tcp_socket
This means that SELinux would prevent apache from listening on port 10080 (aka amanda port).
There is no avc SELinux denial in audit logs.
I run restorecon -vR / to check if I messed SELinux context on some files, and it fixed labels on these files only:
restorecon -vR /
restorecon reset /sys/fs/cgroup context system_u:object_r:tmpfs_t:s0->system_u:object_r:cgroup_t:s0 restorecon reset /etc/systemd/system/cloud-init.service context system_u:object_r:unlabeled_t:s0->system_u:object_r:systemd_unit_file_t:s0 restorecon reset /etc/sysconfig/anaconda context system_u:object_r:etc_runtime_t:s0->system_u:object_r:etc_t:s0 restorecon reset /root/.gnupg context unconfined_u:object_r:admin_home_t:s0->unconfined_u:object_r:gpg_secret_t:s0 restorecon reset /root/.gnupg/gpg.conf context unconfined_u:object_r:admin_home_t:s0->unconfined_u:object_r:gpg_secret_t:s0 restorecon reset /root/.gnupg/secring.gpg context unconfined_u:object_r:admin_home_t:s0->unconfined_u:object_r:gpg_secret_t:s0 restorecon reset /root/.gnupg/pubring.gpg context unconfined_u:object_r:admin_home_t:s0->unconfined_u:object_r:gpg_secret_t:s0 restorecon reset /root/.gnupg/trustdb.gpg context unconfined_u:object_r:admin_home_t:s0->unconfined_u:object_r:gpg_secret_t:s0 restorecon reset /root/.pki context unconfined_u:object_r:admin_home_t:s0->unconfined_u:object_r:home_cert_t:s0 restorecon reset /root/.pki/nssdb context unconfined_u:object_r:admin_home_t:s0->unconfined_u:object_r:home_cert_t:s0
Then immediately after that, I tried to restart apache and check if the avc denial is there again:
# systemctl restart httpd # ausearch -m avc ---- time->Mon Oct 16 11:15:19 2017 type=PROCTITLE msg=audit(1508152519.031:5036): proctitle=2F7573722F7362696E2F6874747064002D44464F524547524F554E44 type=SYSCALL msg=audit(1508152519.031:5036): arch=c000003e syscall=49 success=yes exit=0 a0=6 a1=55b796c3b3a8 a2=1c a3=7ffff139e42c items=0 ppid=1 pid=11057 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(1508152519.031:5036): avc: denied { name_bind } for pid=11057 comm="httpd" src=10080 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:amanda_port_t:s0 tclass=tcp_socket ---- time->Mon Oct 16 12:54:53 2017 type=PROCTITLE msg=audit(1508158493.076:5498): proctitle=2F7573722F7362696E2F6874747064002D44464F524547524F554E44 type=SYSCALL msg=audit(1508158493.076:5498): arch=c000003e syscall=49 success=yes exit=0 a0=6 a1=564104a553a8 a2=1c a3=7ffe9898603c items=0 ppid=1 pid=27485 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(1508158493.076:5498): avc: denied { name_bind } for pid=27485 comm="httpd" src=10080 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:amanda_port_t:s0 tclass=tcp_socket
Which seems to imply that this is not caused by messing with SELinux labels by mistake.
Moreover there already seems to be a SELinux rule trying to allow this, see:
tendrl-selinux/tendrl.te
Line 47 in ffb1b7f
but for some reason, it doesn't work.
The text was updated successfully, but these errors were encountered:
On the other hand, the good news is that there are no additional SELinux AVC denials after importing a cluster on Tendrl Server machine.
Sorry, something went wrong.
#8
Verified to be fixed in #8
TimothyAsir
No branches or pull requests
Description
There is avc denial for apache trying to bind port 10080 (aka amanda port) on Tendrl Server machine.
Version
Steps to Reproduce
ausearch -m avc
.Note: step 2 means that I'm using SELinux targetted policy in permissive mode, with all tendrl selinux packages installed.
Actual Results
In audit logs, there is the following SELinux denial:
This means that SELinux would prevent apache from listening on port 10080 (aka amanda port).
Expected Results
There is no avc SELinux denial in audit logs.
Details
I run
restorecon -vR /
to check if I messed SELinux context on some files, and it fixed labels on these files only:Then immediately after that, I tried to restart apache and check if the avc denial is there again:
Which seems to imply that this is not caused by messing with SELinux labels by mistake.
Moreover there already seems to be a SELinux rule trying to allow this, see:
tendrl-selinux/tendrl.te
Line 47 in ffb1b7f
but for some reason, it doesn't work.
The text was updated successfully, but these errors were encountered: