libvirt/src/storage
Luyao Huang 87b9437f89 storage: fix crash caused by no check return before set close
https://bugzilla.redhat.com/show_bug.cgi?id=1087104#c5

When trying to use an invalid offset to virStorageVolUpload(), libvirt
fails in virFDStreamOpenFileInternal(), although it seems libvirt does
not check the return in storageVolUpload(), and calls
virFDStreamSetInternalCloseCb() right after.  But stream doesn't have a
privateData (is NULL) yet, and the daemon crashes then.

0  0x00007f09429a9c10 in pthread_mutex_lock () from /lib64/libpthread.so.0
1  0x00007f094514dbf5 in virMutexLock (m=<optimized out>) at util/virthread.c:88
2  0x00007f09451cb211 in virFDStreamSetInternalCloseCb at fdstream.c:795
3  0x00007f092ff2c9eb in storageVolUpload at storage/storage_driver.c:2098
4  0x00007f09451f46e0 in virStorageVolUpload at libvirt.c:14000
5  0x00007f0945c78fa1 in remoteDispatchStorageVolUpload at remote_dispatch.h:14339
6  remoteDispatchStorageVolUploadHelper at remote_dispatch.h:14309
7  0x00007f094524a192 in virNetServerProgramDispatchCall at rpc/virnetserverprogram.c:437

Signed-off-by: Luyao Huang <lhuang@redhat.com>
2014-12-03 17:36:07 +01:00
..
parthelper.c
storage_backend_disk.c Remove unnecessary curly brackets in src/storage/ 2014-11-14 17:13:01 +01:00
storage_backend_disk.h
storage_backend_fs.c
storage_backend_fs.h
storage_backend_gluster.c Do not crash on gluster snapshots with no host name 2014-11-12 09:36:31 +01:00
storage_backend_gluster.h
storage_backend_iscsi.c
storage_backend_iscsi.h
storage_backend_logical.c
storage_backend_logical.h
storage_backend_mpath.c
storage_backend_mpath.h
storage_backend_rbd.c
storage_backend_rbd.h
storage_backend_scsi.c
storage_backend_scsi.h
storage_backend_sheepdog.c
storage_backend_sheepdog.h
storage_backend_zfs.c
storage_backend_zfs.h
storage_backend.c
storage_backend.h
storage_driver.c storage: fix crash caused by no check return before set close 2014-12-03 17:36:07 +01:00
storage_driver.h