From: Ian Campbell <Ian.Campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, ian.jackson@eu.citrix.com
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH for-4.5 v2] libxc: don't leak buffer containing the uncompressed PV kernel
Date: Tue, 25 Nov 2014 16:29:10 +0000 [thread overview]
Message-ID: <1416932950.11944.17.camel@citrix.com> (raw)
In-Reply-To: <1416932693.11944.15.camel@citrix.com>
On Tue, 2014-11-25 at 16:24 +0000, Ian Campbell wrote:
> On Thu, 2014-11-20 at 16:03 +0000, Wei Liu wrote:
> > On Thu, Nov 20, 2014 at 03:48:47PM +0000, Ian Campbell wrote:
> > > The libxc xc_dom_* infrastructure uses a very simple malloc memory pool which
> > > is freed by xc_dom_release. However the various xc_try_*_decode routines (other
> > > than the gzip one) just use plain malloc/realloc and therefore the buffer ends
> > > up leaked.
> > >
> > > The memory pool currently supports mmap'd buffers as well as a directly
> > > allocated buffers, however the try decode routines make use of realloc and do
> > > not fit well into this model. Introduce a concept of an external memory block
> > > to the memory pool and provide an interface to register such memory.
> > >
> > > The mmap_ptr and mmap_len fields of the memblock tracking struct lose their
> > > mmap_ prefix since they are now also used for external memory blocks.
> > >
> > > We are only seeing this now because the gzip decoder doesn't leak and it's only
> > > relatively recently that kernels in the wild have switched to better
> > > compression.
> > >
> > > This is https://bugs.debian.org/767295
> > >
> > > Reported by: Gedalya <gedalya@gedalya.net>
> > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> >
> > Reviewed-by: Wei Liu <wei.liu2@citrix.com>
>
> Thanks. Konrad release-acked on IRC so I've applied.
Ian: THis one should be backported I think.
next prev parent reply other threads:[~2014-11-25 16:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 15:48 [PATCH for-4.5 v2] libxc: don't leak buffer containing the uncompressed PV kernel Ian Campbell
2014-11-20 16:03 ` Wei Liu
2014-11-25 16:24 ` Ian Campbell
2014-11-25 16:29 ` Ian Campbell [this message]
2014-11-20 16:58 ` Frediano Ziglio
2014-11-20 20:21 ` Konrad Rzeszutek Wilk
2014-11-21 3:13 ` Gedalya
[not found] ` <546EADD0.8010002@gedalya.net>
2014-11-21 3:19 ` Gedalya
2014-11-21 11:03 ` Ian Campbell
2014-11-21 11:12 ` Ian Campbell
2014-11-21 20:25 ` Gedalya
2014-11-24 10:37 ` Ian Campbell
2014-11-25 7:14 ` Gedalya
2014-11-21 20:19 ` Gedalya
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=1416932950.11944.17.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.