-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] Snapper module _is_text_file function broken #60046
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
I will look into this, we did receive other emails, but it is true I didn't see one around this issue described. I will get back to you on any findings. |
@sagetherage Ah sorry, I thought I had included it in the original report but couldn't check due to encrypting it 🤦 |
@stealthcopter we did migrate the email address recently, but have received emails before and after the migration date. Can you give me some more details on the email address and date sent? You can send those to me here: sage@saltstack.com thank you! |
In SaltStack Salt 2016.9 through 3002.6, a command injection vulnerability exists in the snapper module that allows for local privilege escalation on a minion. The attack requires that a file is created with a pathname that is backed up by snapper, and that the master calls the snapper.diff function (which executes popen unsafely). Cherry-pick the fix from pull request saltstack#59648 [1], but also fix the regression introduced by that commit [2]. [1] saltstack#59648 [2] saltstack#60046 Closes: #987496 Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
In SaltStack Salt 2016.9 through 3002.6, a command injection vulnerability exists in the snapper module that allows for local privilege escalation on a minion. The attack requires that a file is created with a pathname that is backed up by snapper, and that the master calls the snapper.diff function (which executes popen unsafely). Cherry-pick the fix from pull request saltstack#59648 [1], but also fix the regression introduced by that commit [2]. [1] saltstack#59648 [2] saltstack#60046 Closes: #987496 Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
Description
I believe the snapper module's
_is_text_file
has been broken as part of the security vulnerabilities that were fixed in this pull request: #59648Steps to Reproduce the behavior
Attempt to run the snapper module's diff function. Or you can run the following code to test (copied from snapper module):
If you test this out just in a python file you notice it errors with the following:
Expected behavior
For _is_text_file to function correctly
Additional context
** Fix **
This is fixed by changing
STDOUT
toPIPE
. Example:I would be happy to submit a pull request for this if this fix is acceptable.
Note that I attempted to notify you of this via the security email address but was ignored. I have detailed the security vulnerability that was fixed by the previous pull request here:
https://sec.stealthcopter.com/saltstack-snapper-minion-privledge-escaltion/
The text was updated successfully, but these errors were encountered: