[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6fcc0a1002142332r1542e04ex250fa238e4a3231a@mail.gmail.com>
Date: Mon, 15 Feb 2010 09:32:33 +0200
From: Alexey Dobriyan <adobriyan@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] ipcomp: double free at ipcomp_destroy()
On Mon, Feb 15, 2010 at 2:18 AM, Herbert Xu <herbert@...dor.apana.org.au> wrote:
> On Sun, Feb 14, 2010 at 04:44:15PM +0200, Alexey Dobriyan wrote:
>> Consider using ipcomp with tunnel mode:
>>
>> pfkey_add -> xfrm_state_init -> x->type->init_state() == ipcomp4_init_state
>>
>> 1. If ipcomp_tunnel_attach() fails, xfrm_state private data (x->data) are freed
>> first time (synchronously), but stale pointer is left.
>> 2. xfrm_state_init() failed, all right, we're going to do error unwind
>> but this time asynchronously and we're going to double free x->data
>> asynchronously.
>
> Sorry, I don't see the async path, where is it?
pfkey_add
pfkey_msg2xfrm_state
xfrm_init_state [fails]
xfrm_state_put
__xfrm_state_destroy [puts xfrm_state into GC list, schedule work]
xfrm_state_gc_task
xfrm_state_gc_destroy
x->type->destructor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists