]> git.ipfire.org Git - thirdparty/qemu.git/commit
slirp: Fix access to freed memory
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 13 Nov 2016 22:54:27 +0000 (23:54 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 8 Dec 2016 19:56:26 +0000 (13:56 -0600)
commite9dbd28e2a312483cc15613342ab31b962980344
treeba7871cc1e1d6c743d7b5bbe02539db3d6069045
parent92230a5963d308f1ce0ba222bfb3a921f59e1446
slirp: Fix access to freed memory

if_start() goes through the slirp->if_fastq and slirp->if_batchq
list of pending messages, and accesses ifm->ifq_so->so_nqueued of its
elements if ifm->ifq_so != NULL.  When freeing a socket, we thus need
to make sure that any pending message for this socket does not refer
to the socket any more.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Brian Candler <b.candler@pobox.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit ea64d5f08817b5e79e17135dce516c7583107f91)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
slirp/socket.c