Block patches for 2.8
The following changes since commit c36ed06e9159fa484b711dfdd27ec64d7ac3d17a:
Merge remote-tracking branch 'mst/tags/for_upstream' into staging (2016-11-21 11:09:58 +0000)
are available in the git repository at:
https://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
for you to fetch changes up to 668c0e441d761a79f33eae11c120e01a29f9d4dd:
gluster: Fix use after free in glfs_clear_preopened() (2016-11-21 17:04:43 -0500)
----------------------------------------------------------------
Block patches for 2.8
----------------------------------------------------------------
Kevin Wolf (1):
gluster: Fix use after free in glfs_clear_preopened()
block/gluster.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
[Qemu-devel] [PULL for-2.8 1/1] gluster: Fix use after free in glfs_clear_preopened()
From: Kevin Wolf <[email protected]>
This fixes a use-after-free bug introduced in commit 6349c154. We need to use QLIST_FOREACH_SAFE() when freeing elements in the loop. Spotted by Coverity.
Message-id: [email protected]
--- block/gluster.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
block/gluster.c +2 -1
@@ -239,12 +239,13 @@ static glfs_t *glfs_find_preopened(const char *volume)static void glfs_clear_preopened (glfs_t *fs) {ListElement *entry =NULL ; +ListElement *next;if (fs ==NULL ) {return ; } - QLIST_FOREACH(entry, &glfs_list, list) { + QLIST_FOREACH_SAFE(entry, &glfs_list, list, next) {if (entry->saved.fs == fs) {if (--entry->saved.ref) {return ;
Signature · 1 line
2.7.4
Stefan Hajnoczi
AppliedQuoted 16 lines · Jeff Cody
The following changes since commit
c36ed06e9159fa484b711dfdd27ec64d7ac3d17a:Merge remote-tracking branch 'mst/tags/for_upstream' into staging (2016-11-21 11:09:58 +0000)
are available in the git repository at:
https://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
for you to fetch changes up to
668c0e441d761a79f33eae11c120e01a29f9d4dd:gluster: Fix use after free in
glfs_clear_preopened()(2016-11-21 17:04:43 -0500)----------------------------------------------------------------
Block patches for 2.8
----------------------------------------------------------------
Quoted 10 lines
Kevin Wolf (1):
gluster: Fix use after free inglfs_clear_preopened()block/gluster.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Signature · 1 line
2.7.4
Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging
Stefan