-
Notifications
You must be signed in to change notification settings - Fork 2k
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
drivers/exec: Restore 0.8 capabilities #5728
Conversation
Nomad 0.9 incidentally set effective capabilities that is higher than what's expected of a `nobody` process, and what's set in 0.8. This change restores the capabilities to ones used in Nomad 0.9.
) | ||
|
||
// initialize the allCaps var with all capabilities available on the system | ||
func init() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose to avoid using an initializer here. It's only used once at launching executor container (and a executor process only launches a single container now), and we don't need to initialize it in main nomad/logmon/etc process.
Oops, don't forget changelog entry |
So noticed that tests are failing and I'm failing to create some containers unexpectedly; so will dig in and request another review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like some tests are still failing.
@schmichael Oops - I updated tests and they are passing now. |
Nomad 0.9.2 addresses CVE-2019-12618 (hashicorp/nomad#5728). Removes yarn build error -- no longer required as the assets are vendored, so it's possible to build this on i686. Removes nonvidia patch. The changes are upstream in 0.9.2.
Nomad 0.9.2 addresses CVE-2019-12618 (hashicorp/nomad#5728). Removes yarn build error -- no longer required as the assets are vendored, so it's possible to build this on i686. Removes nonvidia patch. The changes are upstream in 0.9.2. Closes: #12169 [via git-merge-pr]
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Nomad 0.9 incidentally set effective capabilities that is higher than
what's expected of a
nobody
process, and what's set in 0.8.This change restores the capabilities to ones used in Nomad 0.8.
The capabilities impact is non-trivial. Some operations (e.g. mount/shutdown) seems to check for effective uid so by default
nobody
user wouldn't be doing much damage. On the other hand, other operations seem to succeed, e.g. binding to privileged ports as nobody.Some capabilities are dangerous: CAP_DAC_OVERRIDE allowed processes to read and manipulate any accessible paths bypassing file permission checks. Restoring proper permisisons, unmasked two tests that didn't have permissions set correctly.