Blame qemu-slirp-use-after-free.patch
|
Mark McLoughlin |
018bb5 |
From 56d370091cb01878c580f528011cd1717f8077fa Mon Sep 17 00:00:00 2001
|
|
Mark McLoughlin |
018bb5 |
From: Mark McLoughlin <markmc@redhat.com>
|
|
Mark McLoughlin |
018bb5 |
Date: Fri, 20 Nov 2009 18:07:15 +0000
|
|
Mark McLoughlin |
018bb5 |
Subject: [PATCH] slirp: fix use-after-free
|
|
Mark McLoughlin |
018bb5 |
|
|
Mark McLoughlin |
018bb5 |
460fec67ee introduced a use-after free in slirp.
|
|
Mark McLoughlin |
018bb5 |
|
|
Mark McLoughlin |
018bb5 |
Cc: Jan Kiszka <jan.kiszka@siemens.com>
|
|
Mark McLoughlin |
018bb5 |
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
|
|
Mark McLoughlin |
018bb5 |
Fedora-patch: qemu-slirp-use-after-free.patch
|
|
Mark McLoughlin |
018bb5 |
---
|
|
Mark McLoughlin |
018bb5 |
slirp/mbuf.c | 2 +-
|
|
Mark McLoughlin |
018bb5 |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
Mark McLoughlin |
018bb5 |
|
|
Mark McLoughlin |
018bb5 |
diff --git a/slirp/mbuf.c b/slirp/mbuf.c
|
|
Mark McLoughlin |
018bb5 |
index 7652fea..87508ba 100644
|
|
Mark McLoughlin |
018bb5 |
--- a/slirp/mbuf.c
|
|
Mark McLoughlin |
018bb5 |
+++ b/slirp/mbuf.c
|
|
Mark McLoughlin |
018bb5 |
@@ -95,8 +95,8 @@ m_free(struct mbuf *m)
|
|
Mark McLoughlin |
018bb5 |
* Either free() it or put it on the free list
|
|
Mark McLoughlin |
018bb5 |
*/
|
|
Mark McLoughlin |
018bb5 |
if (m->m_flags & M_DOFREE) {
|
|
Mark McLoughlin |
018bb5 |
- free(m);
|
|
Mark McLoughlin |
018bb5 |
m->slirp->mbuf_alloced--;
|
|
Mark McLoughlin |
018bb5 |
+ free(m);
|
|
Mark McLoughlin |
018bb5 |
} else if ((m->m_flags & M_FREELIST) == 0) {
|
|
Mark McLoughlin |
018bb5 |
insque(m,&m->slirp->m_freelist);
|
|
Mark McLoughlin |
018bb5 |
m->m_flags = M_FREELIST; /* Clobber other flags */
|
|
Mark McLoughlin |
018bb5 |
--
|
|
Mark McLoughlin |
018bb5 |
1.6.2.5
|
|
Mark McLoughlin |
018bb5 |
|