[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qemu-xen staging-4.13] pr-manager: Fix invalid g_free() crash bug



commit 57fdf4a13ff16d9d48a43f02a5e7b42e3d264f83
Author:     Markus Armbruster <armbru@xxxxxxxxxx>
AuthorDate: Thu Aug 22 15:38:46 2019 +0200
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Sun Oct 27 23:47:31 2019 -0500

    pr-manager: Fix invalid g_free() crash bug
    
    pr_manager_worker() passes its @opaque argument to g_free().  Wrong;
    it points to pr_manager_worker()'s automatic @data.  Broken when
    commit 2f3a7ab39be converted @data from heap- to stack-allocated.  Fix
    by deleting the g_free().
    
    Fixes: 2f3a7ab39bec4ba8022dc4d42ea641165b004e3e
    Cc: qemu-stable@xxxxxxxxxx
    Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
    Acked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
    Signed-off-by: Kevin Wolf <kwolf@xxxxxxxxxx>
    (cherry picked from commit 6b9d62c2a9e83bbad73fb61406f0ff69b46ff6f3)
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 scsi/pr-manager.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scsi/pr-manager.c b/scsi/pr-manager.c
index ee43663576..0c866e8698 100644
--- a/scsi/pr-manager.c
+++ b/scsi/pr-manager.c
@@ -39,7 +39,6 @@ static int pr_manager_worker(void *opaque)
     int fd = data->fd;
     int r;
 
-    g_free(data);
     trace_pr_manager_run(fd, hdr->cmdp[0], hdr->cmdp[1]);
 
     /* The reference was taken in pr_manager_execute.  */
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#staging-4.13



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.