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

Backport of alloc fs: use case-insensitive check for reads of secret/private dir into release/1.8.x #24126

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #24125 to be assessed for backporting due to the inclusion of the label backport/1.8.x.

The below text is copied from the body of the original PR.


When using the Client FS APIs, we check to ensure that reads don't traverse into the allocation's secret dir and private dir. But this check can be bypassed on case-insensitive file systems (ex. Windows, macOS, and Linux with obscure ext4 options enabled). This allows a user with read-fs permissions but not alloc-exec permissions to read from the secrets dir.

This changeset updates the check so that it's case-insensitive. This risks false positives for escape (see linked Go issue), but only if a task without filesystem isolation deliberately writes into the task working directory to do so, which is a fail-safe failure mode.

Ref: golang/go#18358
Ref: https://hashicorp.atlassian.net/browse/NET-10664


Overview of commits

@tgross tgross merged commit ef17378 into release/1.8.x Oct 3, 2024
20 checks passed
@tgross tgross deleted the backport/b-case-sensitive-template-check/blindly-measured-guppy branch October 3, 2024 18:40
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

Successfully merging this pull request may close these issues.

2 participants