[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48887A71.5010209@trash.net>
Date: Thu, 24 Jul 2008 14:49:53 +0200
From: Patrick McHardy <kaber@...sh.net>
To: Pekka Enberg <penberg@...helsinki.fi>
CC: Ingo Molnar <mingo@...e.hu>, David Miller <davem@...emloft.net>,
herbert@...dor.apana.org.au, w@....eu, davidn@...idnewall.com,
torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
stefanr@...6.in-berlin.de, rjw@...k.pl, ilpo.jarvinen@...sinki.fi,
Dave Jones <davej@...hat.com>
Subject: Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL
pointer dereference
Pekka Enberg wrote:
> On Thu, Jul 24, 2008 at 3:03 PM, Patrick McHardy <kaber@...sh.net> wrote:
>> Ingo Molnar wrote:
>>> * Ingo Molnar <mingo@...e.hu> wrote:
>>>
>>>> here's a new type of crash a -tip testbox triggered today:
>>>>
>>>> BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
>>>> IP: [<0000000000000000>] 0x0
>>>> ...
>>>> Call Trace:
>>>> [<ffffffff80777f25>] ? ipv4_confirm+0x8d/0x122
>>>> [<ffffffff80733107>] nf_iterate+0x43/0xa5
>> Does reverting 31d8519c fix this?
>
> Hmm, why do you think it's related? It looks like elem->hook() is a
> NULL pointer but my patch shouldn't make any difference here...
No, its already in ipv4_confirm, so its most likely helper->help()
thats NULL, which is contained in an extension.
The reason why I think its this patch is (quoting from an old
email that I never got a response to):
---
Your patch introduced a use-after-free and double-free.
krealloc() frees the old pointer, but it is still used
for the ->move operations, then freed again.
To fix this I think we need a __krealloc() that doesn't
free the old memory, especially since it must not be
freed immediately because it may still be used in a RCU
read side (see the last part in the patch attached to
this mail (based on a kernel without your patch)).
---
I've attached that patch again.
View attachment "01.diff" of type "text/x-diff" (3307 bytes)
Powered by blists - more mailing lists