From: Mark McLoughlin <markmc@redhat.com>
To: qemu-devel@nongnu.org
Cc: Mark McLoughlin <markmc@redhat.com>, Jan Kiszka <jan.kiszka@siemens.com>
Subject: [Qemu-devel] [PATCH] slirp: fix use-after-free
Date: Fri, 20 Nov 2009 18:13:10 +0000 [thread overview]
Message-ID: <1258740790-26036-1-git-send-email-markmc@redhat.com> (raw)
460fec67ee introduced a use-after free in slirp.
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
Untested fix, but it's obvious.
Also, this is needed on stable-0.11.
slirp/mbuf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/slirp/mbuf.c b/slirp/mbuf.c
index 7652fea..87508ba 100644
--- a/slirp/mbuf.c
+++ b/slirp/mbuf.c
@@ -95,8 +95,8 @@ m_free(struct mbuf *m)
* Either free() it or put it on the free list
*/
if (m->m_flags & M_DOFREE) {
- free(m);
m->slirp->mbuf_alloced--;
+ free(m);
} else if ((m->m_flags & M_FREELIST) == 0) {
insque(m,&m->slirp->m_freelist);
m->m_flags = M_FREELIST; /* Clobber other flags */
--
1.6.2.5
reply other threads:[~2009-11-20 18:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1258740790-26036-1-git-send-email-markmc@redhat.com \
--to=markmc@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).