Skip to content
New issue

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

How to Handle SELinux Denials on Default Temp Dir #3372

Open
eggfoobar opened this issue Oct 6, 2023 · 3 comments
Open

How to Handle SELinux Denials on Default Temp Dir #3372

eggfoobar opened this issue Oct 6, 2023 · 3 comments

Comments

@eggfoobar
Copy link

Hey folks, when using the microshift plugin, we see some SELinux denials when we use the default folder of /var/tmp, changing the temp dir with --tmp-dir to something like /tmp solves the issue, but I was wondering if we should be shipping a solution to this with our plugin for the default behavior?

type=AVC msg=audit(1696227229.107:8490): avc:  denied  { write } for  pid=22413 comm="ovs-appctl" path="/var/tmp/sos.oq1u66ua/sosreport-dhcp-1-235-95-2023-10-02-bnfjcyw/sos_commands/microshift_ovn/ovs-appctl_-t_.var.run.ovn.ovnnb_db.ctl_coverage.show" dev="dm-0" ino=1804675 scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file permissive=0
@TurboTurtle
Copy link
Member

Well we definitely don't want to have any plugins generating AVC denials out of the box. The curious thing to me is why we're only seeing this here. We make many calls to ovs-appctl in other plugins (openvswitch, ovn_central, openshift_ovn), and so far we've not had a report of this.

What's the environment this is being run in? Does the openvswitch plugin also get enabled in a microshift environment, and if so are there any other denials being seen with that plugin?

@pmoravec
Copy link
Contributor

pmoravec commented Oct 7, 2023

Why execution of

ovs-appctl -t /var/run/ovn/ovnnb_db.ctl coverage/show

command can't write to /var/tmp, where SELinux should allow (almost?) anything? That sounds strange to me..

@eggfoobar
Copy link
Author

Yeah agreed, I'm currently getting access to the system this is happening in. As you've stated this shouldn't be happening since there's allow rules for this action already in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants