Re: help reproduce or fix this ipmasq / ip_forward problem

Juanjo Ciarlante (irriga@impsat1.com.ar)
Tue, 1 Dec 1998 21:51:27 -0300


On Tue, Dec 01, 1998 at 11:35:59AM -0500, Brian Ristuccia wrote:
> Enabling ip forwarding when I have ip masquarading rules in the firewall
> table crashes my machine immediately with a null pointer dereference, oops,
> kernel panic inside interrupt handler, no sync. I experience an identical
> failure condition in kernels 2.1.125, 126, 127, 128, 129, and 130. No more
> than a handfull of packets pass through the masquarade before the machine
> locks solid.
>
> Here's my backtrace from 2.1.130:
>
[from OTHER mail...]
> EIP is c016ee64
>
> c016ee14 t cleanup ==> so Oops occurs at offset 0x50 = 80
> c016ee84 t ip_fw_check
doing
$ gdb net/ipv4/ip_fw.o
(gdb) x/30i cleanup
:
0x5ee <cleanup+78>: movl %ebx,%esi
0x5f0 <cleanup+80>: movl 0x1c(%edi,%esi,1),%ebx <*********** oops **
0x5f4 <cleanup+84>: testl %ebx,%ebx
0x5f6 <cleanup+86>: jne 0x5d4 <cleanup+52>
0x5f8 <cleanup+88>: testl %ebp,%ebp
0x5fa <cleanup+90>: je 0x60a <cleanup+106>
:

Which corresponds to (ip_fw.c):

static void cleanup(struct ip_chain *chain,
const int verbose,
unsigned int slot)
{
struct ip_chain *tmpchain = chain->reent[slot].prevchain;
if (verbose)
printk(KERN_ERR "Chain backtrace: ");
while (tmpchain) {
if (verbose)
printk("%s<-",chain->label);
chain->reent[slot].prevchain = NULL;
chain = tmpchain;
********>> tmpchain = chain->reent[slot].prevchain; <<**** oops **
}
if (verbose)
printk("%s\n",chain->label);
}

Paul, can you see any condition that could trigger this ? (I don't know how
chain handling works :(

Maybe we could insert a tappo there and ShoUT bastardly to debug it.

Regards...

-- 
-- Juanjo       http://juanjox.home.ml.org/

== free collective power ==---. Linux <------------'

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/