Bug 1348935 - Buffer overflow when attempting to create filesystem using libgfapi as driver on OpenStack
Summary: Buffer overflow when attempting to create filesystem using libgfapi as driver...
Keywords:
Status: CLOSED DUPLICATE of bug 1350789
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: 3.8.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On: 1349276
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-22 10:56 UTC by Joonas Vilenius
Modified: 2016-06-28 14:46 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 1349276 (view as bug list)
Environment:
Last Closed: 2016-06-28 14:45:40 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
libvirtd log showing the backtrace and memory map (64.75 KB, text/plain)
2016-06-22 10:56 UTC, Joonas Vilenius
no flags Details

Description Joonas Vilenius 2016-06-22 10:56:16 UTC
Created attachment 1170681 [details]
libvirtd log showing the backtrace and memory map

Description of problem:

Having GlusterFS to provide OpenStack Cinder volume storage using libgfapi causes buffer overflow when trying to create a filesystem to attached volume. This results qemu-kvm process for the instance to be terminated.

Version-Release number of selected component (if applicable):
* GlusterFS 3.8.0 on all the involved servers
* CentOS 7.1
* libvirt-daemon-1.2.8-16.el7_1.5.x86_64
* qemu-kvm-1.5.3-86.el7_1.8.x86_64

How reproducible:
Tested in three different environments and all fail similarly.

Steps to Reproduce:
1. deploy an instance
2. attach volume (of type glusterfs)
3. attempt mkfs.ext4 /dev/vdb1

Actual results:
[2016-06-22 09:15:09.350992] E [glfs-fops.c:806:glfs_io_async_cbk] (-->/usr/lib64/glusterfs/3.8.0/xlator/debug/io-stats.so(+0x11e12) [0x7eff84cb8e12] -->/lib64/libgfapi.so.0(+0xbe7d) [0x7f0000ce2e7d] -->/lib64/libgfapi.so.0(+0xbd96) [0x7f0000ce2d96] ) 0-gfapi: invalid argument: iovec [Invalid argument]
*** buffer overflow detected ***: /usr/libexec/qemu-kvm terminated

Expected results:
* filesystem to be created without crashing the instance

Additional info:
There was no such issue with 3.7.11 but we upgraded due to memory leak issues with libgfapi.

Comment 1 Joe Julian 2016-06-22 14:36:58 UTC
Unless I'm reading this wrong, every place that glfs_io_async_cbk is called, the return value is never checked so when that error takes place, none of the unrefs or frees are ever done.

Comment 2 Niels de Vos 2016-06-28 14:45:40 UTC

*** This bug has been marked as a duplicate of bug 1350789 ***


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