Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 908101 - (CVE-2013-0261) CVE-2013-0261 OpenStack packstack: insecure use of /tmp in manifest creation
CVE-2013-0261 OpenStack packstack: insecure use of /tmp in manifest creation
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20130131,repor...
: Security
Depends On: 908102 908103
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-05 16:41 EST by Kurt Seifried
Modified: 2016-04-26 17:23 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-09 00:31:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0595 normal SHIPPED_LIVE Moderate: openstack-packstack security and bug fix update 2013-03-05 21:00:00 EST

  None (edit)
Description Kurt Seifried 2013-02-05 16:41:30 EST
Kurt Seifried of Red Hat reports:

./packstack/installer/basedefs.py
============
VAR_DIR = os.path.join("/var/tmp/packstack",
datetime.datetime.now().strftime('%Y%m%d-%H%M'))
DIR_LOG = VAR_DIR
PUPPET_MANIFEST_DIR = os.path.join(VAR_DIR, "manifests")
============


./packstack/modules/ospluginutils.py
============
def appendManifestFile(manifest_name, data, marker=''):
    if not os.path.exists(basedefs.PUPPET_MANIFEST_DIR):
        os.mkdir(basedefs.PUPPET_MANIFEST_DIR)
    manifestfile = os.path.join(basedefs.PUPPET_MANIFEST_DIR,
manifest_name)
    manifestfiles.addFile(manifestfile, marker)
    with open(manifestfile, 'a') as fp:
        fp.write("\n")
        fp.write(data)
============

So we have several failures here:

1) not setting safe permissions (we don't set permissions/use
os.umask/etc.) which means attackers can read the data, possibly
modify it/etc.

2) not creating directories safely, there is a potential gap between
"if not os.path.exists" and the "os.mkdir" amongst other problems

This can be used to modify manifest files at creation time for example.
Comment 3 Murray McAllister 2013-02-21 22:24:17 EST
Acknowledgements:

This issue was discovered by Kurt Seifried of the Red Hat Security Response Team.
Comment 4 errata-xmlrpc 2013-03-05 16:03:24 EST
This issue has been addressed in following products:

  OpenStack Folsom for RHEL 6

Via RHSA-2013:0595 https://rhn.redhat.com/errata/RHSA-2013-0595.html

Note You need to log in before you can comment on or make changes to this bug.