NetBSD Problem Report #10041

Received: (qmail 7185 invoked from network); 4 May 2000 03:18:22 -0000
Message-Id: <200005040318.UAA29180@nbwww.isc.org>
Date: Wed, 3 May 2000 20:18:22 -0700 (PDT)
From: chrix@home.com
Reply-To: chrix@home.com
To: gnats-bugs@gnats.netbsd.org
Subject: Ipnat caused kernel page fault
X-Send-Pr-Version: www-1.0

>Number:         10041
>Category:       kern
>Synopsis:       Ipnat caused kernel page fault
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    darrenr
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 04 03:19:00 +0000 2000
>Closed-Date:    Wed May 10 12:26:45 +0000 2000
>Last-Modified:  Wed May 10 12:26:45 +0000 2000
>Originator:     Chris H..
>Release:        NetBSD formal release 1.4.2
>Organization:
>Environment:
NetBSD Gateway.boxz.com 1.4.2 NetBSD 1.4.2 (GENERIC) #3: Wed Mar 15 23:41:54 PST
 2000     toddpw@vader.toddpw.net:/usr/src/sys/arch/i386/compile/GENERIC i386

>Description:
Instead of enabling "ipnat" throught the "/etc/rc.conf" by setting ipnat=YES, the system will crashed if super user issue "ipnat -f /etc/ipnat.conf" at the command line..

my /etc/ipnat.conf is
#rdr de0 0.0.0.0/0 port 23 -> 192.168.0.5 port 23 tcp
map de0 192.168.0.0/24 -> 0.0.0.0/32 portmap tcp/udp 2000:30000
map de0 192.168.0.0/24 -> 0.0.0.0/32

The error message on the console is
uvm_fault (0xc2310840,0x0,0,1) -> 1
kernel : page fault trap, code = 0
stopped in ipnat at _nat_ioctl+0x2ed : cmpl $0,0 (%edx)
db>


>How-To-Repeat:
make sure that ipnat is not enabled.
if it is enabled, in "/etc/rc.conf" set ipfilter=NO and ipnat=NO  
and reboot.

do "ipnat -f /etc/ipnat.conf" at command line as root
>Fix:


>Release-Note:
>Audit-Trail:

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: chrix@home.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/10041: Ipnat caused kernel page fault
Date: Thu, 4 May 2000 19:20:48 +0200

 On Wed, May 03, 2000 at 08:18:22PM -0700, chrix@home.com wrote:
 > 
 > >Number:         10041
 > >Category:       port-i386
 > >Synopsis:       Ipnat caused kernel page fault
 > >Confidential:   no
 > >Severity:       critical
 > >Priority:       high
 > >Responsible:    port-i386-maintainer
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Wed May 03 20:19:00 PDT 2000
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Chris H..
 > >Release:        NetBSD formal release 1.4.2
 > >Organization:
 > >Environment:
 > NetBSD Gateway.boxz.com 1.4.2 NetBSD 1.4.2 (GENERIC) #3: Wed Mar 15 23:41:54 PST
 >  2000     toddpw@vader.toddpw.net:/usr/src/sys/arch/i386/compile/GENERIC i386
 > 
 > >Description:
 > Instead of enabling "ipnat" throught the "/etc/rc.conf" by setting ipnat=YES, the system will crashed if super user issue "ipnat -f /etc/ipnat.conf" at the command line..
 > 
 > my /etc/ipnat.conf is
 > #rdr de0 0.0.0.0/0 port 23 -> 192.168.0.5 port 23 tcp
 > map de0 192.168.0.0/24 -> 0.0.0.0/32 portmap tcp/udp 2000:30000
 > map de0 192.168.0.0/24 -> 0.0.0.0/32
 >  
 > The error message on the console is
 > uvm_fault (0xc2310840,0x0,0,1) -> 1
 > kernel : page fault trap, code = 0
 > stopped in ipnat at _nat_ioctl+0x2ed : cmpl $0,0 (%edx)
 > db>
 > 
 > 
 > >How-To-Repeat:
 > make sure that ipnat is not enabled.
 > if it is enabled, in "/etc/rc.conf" set ipfilter=NO and ipnat=NO  
 > and reboot.
 > 
 > do "ipnat -f /etc/ipnat.conf" at command line as root

 Hum, I've done this quite some time and never got problems. But I think I've
 always flushed the rules before loading new ones.

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 --

From: "Chris Huang" <chrix@home.com>
To: "Manuel Bouyer" <bouyer@antioche.lip6.fr>
Cc: <gnats-bugs@gnats.netbsd.org>
Subject: Re: port-i386/10041: Ipnat caused kernel page fault
Date: Thu, 4 May 2000 12:45:58 -0600

 > Hum, I've done this quite some time and never got problems. But I think
 I've
 > always flushed the rules before loading new ones.

 > --
 > Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 > --

 thats true... ;- )

 but the condition here is that system did not load any rules at boot time
 ( so there isn`t any  previous rules to flush...) and  a root user try to
 enable it manually..

 the following system is booted with "ipfilter=NO" and "ipnat=NO" in
 "/etc/rc.conf"

 root@Gateway# ipnat -F
 0 entries flushed from NAT table
 root@Gateway# ipnat -l
 List of active MAP/Redirect filters:
 kmemcpy:read: Bad address
 kmemcpy: Bad address
 root@Gateway# ipnat -f /etc/ipnat.conf
 < crashed from here >

 Chris




Responsible-Changed-From-To: port-i386-maintainer->darrenr 
Responsible-Changed-By: darrenr 
Responsible-Changed-When: Fri May 5 19:18:33 PDT 2000 
Responsible-Changed-Why:  
darrenr is responsible for this POS 
State-Changed-From-To: open->feedback 
State-Changed-By: darrenr 
State-Changed-When: Fri May 5 19:21:38 PDT 2000 
State-Changed-Why:  
user has been advised that this is a known problem, with it fixed in 
-current and uncertainty about a fix pulled up for 1.4-STABLE 

From: Darren Reed <darrenr@reed.wattle.id.au>
To: chrix@home.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: kern/10041 - Ipnat caused kernel page fault
Date: Sat, 6 May 2000 12:21:23 +1000 (EST)

 The problem is that you are not doing "ipf -E" to enable IP Filter before
 you do any other IP Filter commands.  A fix for this may have been pulled
 up into NetBSD-1.4.2 (I'm not sure) but it is definately fixed in the
 version found in -current.

 Darren
State-Changed-From-To: feedback->closed 
State-Changed-By: darrenr 
State-Changed-When: Wed May 10 05:25:11 PDT 2000 
State-Changed-Why:  
feedback has been sent to the user, no response received. 
the problem is fixed in -current and if the user jumps through hoops 
in the correct order, they won't fall over. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.