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

Systemd update causes SELinux to deny cockpit.socket when updating the MOTD #107

Open
jeepingben opened this issue Nov 8, 2023 · 10 comments
Assignees

Comments

@jeepingben
Copy link

A recent systemd update (either systemd-239-74.0.5.el8_8.5.x86_64.rpm or systemd-239-74.0.6.el8_8.5.x86_64.rpm) results in SELinux denials when starting cockpit.
Screenshot 2023-11-08 at 15 46 45
This prevents cockpit.socket's ExecStartPost script form getting the correct listening port when updating the MOTD.
This is a pretty tiny effect and I only noticed because of the new denials.

Steps to reproduce:
Clean install of OL8 that includes cockpit
sudo systemctl start cockpit
sudo ausearch -m avc

You can stop it from happening by downgrading to systemd-239-74.0.4.el8_8.3.x86_64.rpm and rebooting.

@jeepingben
Copy link
Author

@AmedeeBulle - Our contact at Oracle recommended I ping you about this issue. Can you get someone to take a look at it?

Is this issues page the replacement for bugzilla.oracle.com?

@AmedeeBulle AmedeeBulle self-assigned this Nov 15, 2023
@AmedeeBulle
Copy link
Member

I'll report this internally

@scoter-oracle
Copy link
Member

Cannot be reproduced with systemd-239-78.0.1.el8.x86_64 (actual latest).

@jeepingben
Copy link
Author

jeepingben commented Feb 8, 2024

I am still seeing this with
Name : systemd
Version : 239
Release : 78.0.3.el8

I just confirmed again by doing a fresh net install of OL8.9. After install, I ran systemctl enable --now cockpit.socket, logged out, logged back in, ran ausearch -m avc` and got the same denial.

@tvierling tvierling reopened this Feb 9, 2024
@YoderExMachina
Copy link
Member

I can't duplicate this with systemd-239-78.0.4.el8.x86_64. Can this issue be closed?

@jeepingben
Copy link
Author

I am still seeing this on the system I checked with systemd-239-78.0.4, but I am doing a clean net-install of OL8.9 to make sure it isn't something about my system.

Are you on a system that displays the cockpit-motd (Web console: https://$host:port or https://$ip:port)?

@jeepingben
Copy link
Author

On a fresh install with this software configuration:

Screenshot 2024-05-24 at 12 53 55
This is what happens on first login:

My.Movie.1.mp4

@YoderExMachina
Copy link
Member

Yes, I was testing on a fresh install of OL8.9 in OCI and I get the cockpit-motd no problem. When I do an ausearch I see the same 4 entries, but the cockpit-motd is working. I tried a bare metal system as well with a fresh install I still see the cockpit-motd. I tried from the console too and I am seeing the cockpit-motd. Also I verified I can access via the port listed. So is the issue that you are getting the avc records even though it's working?

@jeepingben
Copy link
Author

Right, the denial is the main concern. I make some images which have an autotest that asserts no SELinux denials happened during the tests. I thought there was an issue with the systemctl command in update-motd failing to find alternate listening ports but I'm not seeing that right now

@jeepingben
Copy link
Author

jeepingben commented Aug 21, 2024

audit2allow says that what is missing is:

#============= cockpit_ws_t ==============
allow cockpit_ws_t cgroup_t:filesystem getattr;
allow cockpit_ws_t tmpfs_t:filesystem getattr;

Is it just a matter of adding that to the appropriate policy?

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

5 participants