First published: Tue Mar 05 2013(Updated: )
Derek Higgins (derekh) of Red Hat reports: packstack creates a answerfile containing configuration details for an openstack deployment. But after a recent comment in <a class="bz_bug_link bz_status_CLOSED bz_closed bz_public " title="CLOSED ERRATA - Generate answer file when running on live mode" href="show_bug.cgi?id=906410">https://bugzilla.redhat.com/show_bug.cgi?id=906410</a> [Open URL] <a href="show_bug.cgi?id=917904#c4">comment 4</a>, I reviewed the code on how it is generated. The file was being opened, written to and then the mode was being changed to 600: <a href="https://github.com/stackforge/packstack/blob/07a7897038bee143630fd84e95b3a4f5c89a5b47/packstack/installer/run_setup.py">https://github.com/stackforge/packstack/blob/07a7897038bee143630fd84e95b3a4f5c89a5b47/packstack/installer/run_setup.py</a> def generateAnswerFile(outputFile, overrides={}): sep = os.linesep fmt = ("%(comment)s%(separator)s%(conf_name)s=%(default_value)s" "%(separator)s") outputFile = os.path.expanduser(outputFile) with open(outputFile, "w") as ans_file: ... os.chmod(outputFile, 0600) and the answer path is provided by: def _getanswerfilepath(): path = None msg = "Could not find a suitable path on which to create the answerfile" # We'll use the first path with # write permissions. Order matters. for p in ["./", "~/", "/tmp"]: if os.access(p, os.W_OK): path = os.path.abspath( The current directory "./" may be accessible to an attacker, and "/tmp" is definitely accessible to attackers. The file permissions should also be set securely prior to placing the information in it.
Credit: secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
Redhat Openstack Essex | ||
Redhat Openstack Folsom | ||
Redhat Packstack | =2012.2.3 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.