Bug 1261606 (CVE-2015-5245) - CVE-2015-5245 Ceph: RGW returns requested bucket name raw in Bucket response header
Summary: CVE-2015-5245 Ceph: RGW returns requested bucket name raw in Bucket response ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2015-5245
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1258620 1258621 1277345
Blocks: 1261607
TreeView+ depends on / blocked
 
Reported: 2015-09-09 18:37 UTC by Kurt Seifried
Modified: 2019-09-29 13:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A feature in Ceph Object Gateway (RGW) allows to return a specific HTTP header that contains the name of a bucket that was accessed. It was found that the returned HTTP headers were not sanitized. An unauthenticated attacker could use this flaw to craft HTTP headers in responses that would confuse the load balancer residing in front of RGW, potentially resulting in a denial of service.
Clone Of:
Environment:
Last Closed: 2015-12-02 10:24:13 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2066 0 normal SHIPPED_LIVE Moderate: Red Hat Ceph Storage 1.3.1 security, bug fix, and enhancement update 2015-11-24 02:34:55 UTC
Red Hat Product Errata RHSA-2015:2512 0 normal SHIPPED_LIVE Moderate: Red Hat Ceph Storage 1.3.1 security, bug fix, and enhancement update 2016-02-03 03:15:52 UTC

Description Kurt Seifried 2015-09-09 18:37:18 UTC
Upstream reports:

PCI scans have determined that the RGW is returning whatever string it thought was the name of the bucket requested as raw text in the Bucket response header, which we are using to be able to track request/response cycles by bucket. The result is that things like this are possible (note the extra Content-type header):

<snip>
$ curl -i "objects.dreamhost.com/nothing-to-see-here%22%0D%0AContent-type%3A%20%22image-jpg";echo
HTTP/1.1 400 Bad Request
Bucket: "nothing-to-see-here" 
Content-type: "image-jpg" 
Content-Length: 83
Accept-Ranges: bytes
Content-type: application/xml
Date: Mon, 27 Jul 2015 22:57:11 GMT

<Error><Code>InvalidBucketName</Code></Error>
</snip>

This could be considerably worse. It is in fact trivial to make the RGW return invalid HTTP responses this way as well (the resulting response is from HAProxy rejecting the invalid response from the RGW, as it should):

</snip>
$ curl -i "objects.dreamhost.com/nothing-to-see-here%22%0D%0AContent-Length%3A%20%2282";echo
HTTP/1.0 502 Bad Gateway
Cache-Control: no-cache
Connection: close
Content-Type: text/html

<html><body><h1>502 Bad Gateway</h1>
The server returned an invalid or incomplete response.
</body></html>
</snip>

The RGW needs to sanitize/clean-up the bucket name before including it in the bucket header, by encoding the data in a standard encoding so that it is impossible to do things like inserting new headers, data, etc.. that looks like meaningful parts of a real HTTP response.

External reference:
http://tracker.ceph.com/issues/12537

Comment 2 errata-xmlrpc 2015-11-23 20:22:33 UTC
This issue has been addressed in the following products:

 Red Hat Ceph Storage 1.3 for Ubuntu 14.04

Via RHSA-2015:2512 https://access.redhat.com/errata/RHSA-2015:2512

Comment 3 errata-xmlrpc 2015-11-23 21:36:10 UTC
This issue has been addressed in the following products:

  Red Hat Ceph Storage 1.3 for RHEL 7

Via RHSA-2015:2066 https://access.redhat.com/errata/RHSA-2015:2066


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