-
Notifications
You must be signed in to change notification settings - Fork 689
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
[xenial] haveged process is unconfined under Xenial #4098
Comments
Took a look at this since I had Xenial staging VMs up today. The haveged process has a profile already defined, but for some reason the process is running unconfined. Heading to the AppArmor FAQ, it says:
Following this, I restarted haveged in my Xenial VMs, and AppArmor now reports it's running the haveged profile in enforce mode:
Great. But then something happens, and after a few minutes running Investigating further, in
This is upstream unresolved bug https://bugs.launchpad.net/ubuntu/+source/haveged/+bug/1708674 In that bug, they report that adding Trying this locally, one can verify that this does indeed resolve the issue by first adding that line to the AppArmor profile and then:
However, there does appear to be an issue where upon reboot, |
If I directly edit the init script in To recap, we've found that the cause of the failure were the following two problems:
Our choices to resolve are:
I propose we do 1 and 2. That is, we temporarily fix ourselves so that haveged is running confined in 0.12.0 on xenial, and then prod upstream ubuntu to resolve these two bugs. What do you think @kushaldas @emkll? If you're thinking "but what if upstream pushes a new package in the meantime?", well, it turns out there hasn't been a new haveged release since 2015 and the only bug filed in the couple of years in launchpad for haveged is this one. This is the lowest risk option that is available to us on the 0.12.0 timescale (indeed, there's a very good chance that when a new release occurs it will fix the AppArmor profile). |
I am 👍 to both of those points. As a small note: I could not reproduce this error :( Once again the operating system is playing with us. |
I can reproduce this error:
I agree, let's go for 1 and 2, I've tested the fix from Debian upstream linked above [0], and it works reliably based on local testing. Based on my understanding, prod upstream changes will, at worst, break AppArmor profile for haveged, and we can add an infra test to guard against this regression. How should we deliver this change? unattended (postinst) or attended (Ansible)? Given that it's and the requirement to run [0] : https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=824179;filename=haveged-824179.patch;msg=10 |
There were two issues causing haveged to run unconfined on Xenial: 1. The AppArmor profile needed updating to whitelist rw for the PID file that haveged uses [0]. 2. The haveged service needed to be configured to start running only after AppArmor is running [1, 2]. [0] https://bugs.launchpad.net/ubuntu/+source/haveged/+bug/1708674 [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824179 [2] #4098
There were two issues causing haveged to run unconfined on Xenial: 1. The AppArmor profile needed updating to whitelist rw for the PID file that haveged uses [0]. 2. The haveged service needed to be configured to start running only after AppArmor is running [1, 2]. [0] https://bugs.launchpad.net/ubuntu/+source/haveged/+bug/1708674 [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824179 [2] #4098
There were two issues causing haveged to run unconfined on Xenial: 1. The AppArmor profile needed updating to whitelist rw for the PID file that haveged uses [0]. 2. The haveged service needed to be configured to start running only after AppArmor is running [1, 2]. [0] https://bugs.launchpad.net/ubuntu/+source/haveged/+bug/1708674 [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824179 [2] #4098
Description
Running under Xenial, the
haveged
process is reported as unconfined byaa-status
. Should we confine it under Xenial?Steps to Reproduce
make staging-xenial
(runmake build-debs-xenial
first if you haven't recently)app-staging
and runsudo aa-status
Expected Behavior
The haveged process is confined by AppArmor.
Actual Behavior
The haveged process is not confined by AppArmor. We have branch logic in the config tests to permit a single unconfined process under Xenial (as opposed to Trusty, which expects zero unconfined processes), to accommodate.
Comments
Do we want to confine haveged? If so, must we write a custom profile, or can we retrieve one via upstream packages present in the Xenial repos? Investigate the status under Trusty, where we do not currently maintain a profile specifically for haveged.
The text was updated successfully, but these errors were encountered: