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

NAS-132572 / 24.10.1 / Safely extract user config (by anodos325) #14994

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

bugclerk
Copy link
Contributor

Since user is providing this file and method already replacing our configuration in many ways, the original usage doesn't pose a security risk. This change provides protection against a broken config file rewriting files outside the temporary directory used for extraction and causing undefined system behavior.

This commit uses Samba's safe_tarfile wrapper to extract the file with note to replace once we have a python version from upstream debian that supports the newer tarfile feature.

Original PR: #14969
Jira URL: https://ixsystems.atlassian.net/browse/NAS-132572

Since user is providing this file and method already replacing our
configuration in many ways, the original usage doesn't pose
a security risk. This change provides protection against a broken
config file rewriting files outside the temporary directory used for
extraction and causing undefined system behavior.

This commit uses Samba's safe_tarfile wrapper to extract the file
with note to replace once we have a python version from upstream
debian that supports the newer tarfile feature.

(cherry picked from commit 979daca)
@anodos325 anodos325 merged commit 1696f65 into stable/electriceel Nov 20, 2024
1 of 2 checks passed
@anodos325 anodos325 deleted the NAS-132572-24.10.1 branch November 20, 2024 17:24
@bugclerk
Copy link
Contributor Author

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants