Bug 2302128
| Summary: | grafana-server runs a unconfined service type | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jan Kurik <jkurik> |
| Component: | grafana | Assignee: | sfeifer |
| Status: | VERIFIED --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 42 | CC: | agerstmayr, go-sig, jkurik, lchilton, nathans, scox, sfeifer |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Jan Kurik
2024-07-31 18:35:47 UTC
After some discussion with selinux maintainers I was pointed to this Change: https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin which is causing the issue. As such, we need to extend the grafana selinux policy with the following records: /usr/bin/grafana-cli -- gen_context(system_u:object_r:grafana_exec_t,s0) /usr/bin/grafana-server -- gen_context(system_u:object_r:grafana_exec_t,s0) Actually we need also a record for /usr/bin/grafana. So the complete list of rules will look like this: /usr/bin/grafana-cli -- gen_context(system_u:object_r:grafana_exec_t,s0) /usr/bin/grafana-server -- gen_context(system_u:object_r:grafana_exec_t,s0) /usr/bin/grafana -- gen_context(system_u:object_r:grafana_exec_t,s0) As a workaround, before the policy is extended, this works for me: cat << EOF > grafana_tmp.cil (filecon "/usr/bin/grafana-cli" file (system_u object_r grafana_exec_t ((s0) (s0)))) (filecon "/usr/bin/grafana-server" file (system_u object_r grafana_exec_t ((s0) (s0)))) (filecon "/usr/bin/grafana" file (system_u object_r grafana_exec_t ((s0) (s0)))) EOF sudo semodule -i grafana_tmp.cil Fixed in grafana-10.2.6-5.fc41 build. This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle. Changing version to 42. |