Bug 464510
| Summary: | gjots2 uses un-escaped gpg pass-phrase in shell command(s) | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Steven Bakker <sb> |
| Component: | gjots2 | Assignee: | Radek Vokál <rvokal> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9 | CC: | bhepple, rvokal |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2008-11-07 12:50:30 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
fixed in 2.3.8 gjots2-2.3.8-1.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/gjots2-2.3.8-1.fc10 gjots2-2.3.8-1.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: When trying to open a gpg encrypted file with gjots2, the program asks for a passphrase and subsequently uses the (unescaped) answer in a popen() command line: f = os.popen("echo " + self.gui.password + " | gpg ..."); (lines 310 and 313 of lib/file.py) This can cause errors from the shell if the actual pass-phrase contains shell meta-characters and can lead to unintentional side-effects. Version-Release number of selected component (if applicable): How reproducible: Always. Steps to Reproduce: 1. Use gjots2 to open a gpg encrypted file. 2. In the password dialog, enter: ;touch /tmp/U-R-HACKED;echo Actual results: There is now a file U-R-HACKED in /tmp. Expected results: No side effects. Additional info: This is in lib/file.py in the source distribution around lines 310 and 313. I don't know enough Python to suggest a good fix for this. It's probably not so much a security issue as a possibly nasty bug. If my password contains a single quote, or a "$", or any other shell meta-character, I will not be able to decrypt my file. No idea if this has been fixed in 2.3.7 (which is the latest version).