From: Benjamin LaHaise <bcrl@kvack.org>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: viro@zeniv.linux.org.uk, linux-aio@kvack.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] aio: prevent double free in ioctx_alloc
Date: Tue, 19 Nov 2013 17:45:13 -0500 [thread overview]
Message-ID: <20131119224513.GF14098@kvack.org> (raw)
In-Reply-To: <1384900383-22009-1-git-send-email-sasha.levin@oracle.com>
On Tue, Nov 19, 2013 at 05:33:02PM -0500, Sasha Levin wrote:
> ioctx_alloc() calls aio_setup_ring() to allocate a ring. If aio_setup_ring()
> fails to do so it would call aio_free_ring() before returning, but
> ioctx_alloc() would call aio_free_ring() again causing a double free of
> the ring.
>
> This is easily reproducible from userspace.
I've applied this to my aio-next tree at git://git.kvack.org/~bcrl/aio-next.git
. Please verify that it applied correctly, as that tree also includes
another fix from Kent relating to the percpu reference bits.
-ben
--
"Thought is the essence of where you are now."
prev parent reply other threads:[~2013-11-19 22:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 22:33 [PATCH 1/2] aio: prevent double free in ioctx_alloc Sasha Levin
2013-11-19 22:33 ` [PATCH 2/2] aio: nullify aio->ring_pages after freeing it Sasha Levin
2013-11-19 22:45 ` Benjamin LaHaise
2013-11-19 22:45 ` Benjamin LaHaise [this message]
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=20131119224513.GF14098@kvack.org \
--to=bcrl@kvack.org \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sasha.levin@oracle.com \
--cc=viro@zeniv.linux.org.uk \
/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