[OSSA-2015-002] Glance still allows users to download and delete any file in glance-api server (CVE-2015-1195)

Bug #1408663 reported by Thierry Carrez
270
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Grant Murphy
Icehouse
Fix Released
Critical
Grant Murphy
Juno
Fix Released
Critical
Grant Murphy
OpenStack Security Advisory
Fix Released
Critical
Unassigned

Bug Description

Jin Liu reported that OSSA-2014-041 (CVE-2014-9493) only fixed the vulnerability for swift: and file: URI, but overlooked filesystem: URIs.

Please see bug 1400966 for historical reference.

CVE References

Thierry Carrez (ttx)
information type: Public → Public Security
Changed in ossa:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Thierry Carrez (ttx) wrote :
Changed in glance:
status: New → In Progress
importance: Undecided → Critical
Revision history for this message
Grant Murphy (gmurphy) wrote :
Changed in glance:
assignee: nobody → Grant Murphy (gmurphy)
Revision history for this message
Tristan Cacqueray (tristan-cacqueray) wrote :

Impact description draft #1:

Title: Glance v2 API unrestricted path traversal through filesystem:// scheme
Reporter: Jin Liu (IBM)
Products: Glance
Versions: up to 2014.1.3 and 2014.2 version up to 2014.2.1

Description:
Jin Liu from IBM reported that path traversal vulnerability in Glance were not fully patched in OSSA 2014-041. By setting a malicious image location to a filesystem:// scheme an authenticated user can still download or delete any file on the Glance server for which the Glance process user has access to. Only setups using the Glance V2 API are affected by this flaw.

Revision history for this message
Jeremy Stanley (fungi) wrote :

"2014.2 versions up to 2014.2.1" and "path traversal vulnerabilities in Glance were" but otherwise the proposed impact description looks good to me.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/145974

Revision history for this message
Thierry Carrez (ttx) wrote : Re: Glance still allows users to download and delete any file in glance-api server

Jin Liu seems to be from EMC. Otherwise looks good. Could use a Glance coresec check though, adding them to the bug.

Changed in ossa:
status: Confirmed → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/145640
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=a2d986b976e9325a272e2d422465165315d19fe6
Submitter: Jenkins
Branch: master

commit a2d986b976e9325a272e2d422465165315d19fe6
Author: Grant Murphy <email address hidden>
Date: Wed Jan 7 16:09:38 2015 -0800

    Prevent file, swift+config and filesystem schemes

    This change ensures that 'file', 'filesystem', and 'swift+config' URI
    schemes are not allowed when setting the location field. A previous
    fix to CVE-2014-9493 attempted to address this issue but did not
    include 'filesystem', a URI scheme allowed by the glance_store.

    Without this fix in place it is possible for a client to access any file
    the glance-api server has read permissions for.

    Change-Id: I02cd099a8634b9c7e3cf8f172bcbd33f8edcbc83
    Closes-Bug: #1408663

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
Tristan Cacqueray (tristan-cacqueray) wrote : Re: Glance still allows users to download and delete any file in glance-api server

@Jin Liu: we will credit EMC as your company, if it's ok for you, you might want to update your openstack community profile... see: http://www.openstack.org/community/members/profile/17173

Thanks for the review, here is the impact description draft #2:

Title: Glance v2 API unrestricted path traversal through filesystem:// scheme
Reporter: Jin Liu (EMC)
Products: Glance
Versions: up to 2014.1.3 and 2014.2 versions up to 2014.2.1

Description:
Jin Liu from EMC reported that path traversal vulnerabilities in Glance were not fully patched in OSSA 2014-041. By setting a malicious image location to a filesystem:// scheme an authenticated user can still download or delete any file on the Glance server for which the Glance process user has access to. Only setups using the Glance V2 API are affected by this flaw.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/juno)

Reviewed: https://review.openstack.org/145916
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=5191ed1879c5fd5b2694f922bcedec232f461088
Submitter: Jenkins
Branch: stable/juno

commit 5191ed1879c5fd5b2694f922bcedec232f461088
Author: Grant Murphy <email address hidden>
Date: Wed Jan 7 16:09:38 2015 -0800

    Prevent file, swift+config and filesystem schemes

    This change ensures that 'file', 'filesystem', and 'swift+config' URI
    schemes are not allowed when setting the location field. A previous
    fix to CVE-2014-9493 attempted to address this issue but did not
    include 'filesystem', a URI scheme allowed by the glance_store.

    Without this fix in place it is possible for a client to access any file
    the glance-api server has read permissions for.

    Change-Id: I02cd099a8634b9c7e3cf8f172bcbd33f8edcbc83
    Closes-Bug: #1408663
    (cherry picked from commit a2d986b976e9325a272e2d422465165315d19fe6)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/icehouse)

Reviewed: https://review.openstack.org/145974
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=7d3a1db33ccbd25b9fc7326ce3468eabd2a41a99
Submitter: Jenkins
Branch: stable/icehouse

commit 7d3a1db33ccbd25b9fc7326ce3468eabd2a41a99
Author: Grant Murphy <email address hidden>
Date: Wed Jan 7 16:09:38 2015 -0800

    Prevent file, swift+config and filesystem schemes

    This change ensures that 'file', 'filesystem', and 'swift+config' URI
    schemes are not allowed when setting the location field. A previous
    fix to CVE-2014-9493 attempted to address this issue but did not
    include 'filesystem', a URI scheme allowed by the glance_store.

    Without this fix in place it is possible for a client to access any file
    the glance-api server has read permissions for.

    (cherry picked from commit 5191ed1879c5fd5b2694f922bcedec232f461088)

    Conflicts:
     glance/common/store_utils.py

    Change-Id: I02cd099a8634b9c7e3cf8f172bcbd33f8edcbc83
    Closes-Bug: #1408663

Revision history for this message
Jeremy Stanley (fungi) wrote : Re: Glance still allows users to download and delete any file in glance-api server

Tristan's updated impact description in comment #8 looks good to me.

Revision history for this message
Tristan Cacqueray (tristan-cacqueray) wrote :

@Glance-coresec: can someone please confirm if the impact description in comment #8 is correct ?

I'm waiting for your approval before requesting a CVE, thanks in advance!

Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :

The impact description in comment #8 from Tristan, looks good to me.

Revision history for this message
Tristan Cacqueray (tristan-cacqueray) wrote : Re: [OSSA-2015-002] Glance still allows users to download and delete any file in glance-api server

The OSSA have been published without CVE, will switch the OSSA task to "fix released" once one is assigned and the errata is out.

summary: - Glance still allows users to download and delete any file in glance-api
- server
+ [OSSA-2015-002] Glance still allows users to download and delete any
+ file in glance-api server
Changed in ossa:
status: Triaged → In Progress
Jeremy Stanley (fungi)
summary: [OSSA-2015-002] Glance still allows users to download and delete any
- file in glance-api server
+ file in glance-api server (CVE-2015-1195)
Changed in ossa:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ossa (master)

Reviewed: https://review.openstack.org/147556
Committed: https://git.openstack.org/cgit/openstack/ossa/commit/?id=f6b1f51a54c7029f487972e6cbb7c9df98dda01d
Submitter: Jenkins
Branch: master

commit f6b1f51a54c7029f487972e6cbb7c9df98dda01d
Author: Tristan Cacqueray <email address hidden>
Date: Thu Jan 15 15:36:30 2015 +0000

    Adds OSSA-2015-002

    Related-Bug: #1408663
    Change-Id: Id36443b17f18a0f0cbcfd731c4fd50d8f2ffd9d1

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/150736

Thierry Carrez (ttx)
Changed in glance:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: kilo-2 → 2015.1.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by Ian Cordasco (<email address hidden>) on branch: master
Review: https://review.openstack.org/150736
Reason: There's been no discussion of this since February. Zhi Yan Liu and I agree that this is a dangerous change, so I'm abandoning this for now. If this is something we want later on, we can always restore it.

To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.