Bug 1377774

Summary: Potential non-null terminated block name prefix string from API
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Jason Dillaman <jdillama>
Component: RBDAssignee: Jason Dillaman <jdillama>
Status: CLOSED ERRATA QA Contact: Vasishta <vashastr>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0CC: ceph-eng-bugs, hnallurv, uboppana
Target Milestone: rc   
Target Release: 2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-10.2.3-2.el7cp Ubuntu: ceph_10.2.3-3redhat1xenial Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-22 19:30:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jason Dillaman 2016-09-20 14:59:45 UTC
Description of problem:
If a v2 image's randomly generated id is longer than 14 characters, it will overflow the fixed-sized C-string allocated for the block name prefix within the 'stat' function.

It has been reported upstream that OpenStack glance, due to this potential string overflow within the librbd Python bindings, can fail to function.

Version-Release number of selected component (if applicable):
2.0, 1.3

How reproducible:
Random -- requires a v2 image whose randomly generated image id is longer than 14 characters.

Steps to Reproduce:
1. Get rbd CLI to generate a v2 image id > 14 characters
2. Use "stat" API method -- block_name_prefix C-string within result might not be null terminated.

Actual results:


Expected results:


Additional info:

Comment 1 Jason Dillaman 2016-09-20 15:05:00 UTC
Upstream, master branch PR: https://github.com/ceph/ceph/pull/11148

Comment 9 errata-xmlrpc 2016-11-22 19:30:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2815.html