Subject: kern/23203: sysctl_rtable can deplete the kmem_map
To: None <>
From: None <>
List: netbsd-bugs
Date: 10/19/2003 20:50:18
>Number:         23203
>Category:       kern
>Synopsis:       sysctl_rtable can deplete the kmem_map
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 20 03:51:00 UTC 2003
>Originator:     Jason R Thorpe
>Release:        NetBSD 1.6ZC
        -- Jason R. Thorpe <>
System: NetBSD 1.6ZC NetBSD 1.6ZC (SHAG-NET4501) #85: Sat Sep 27 13:26:06 PDT 2003 i386
Architecture: i386
Machine: i386
	I have experienced several crashes of my NetBSD-based 802.11 AP
	today.  All of them were "out of space in kmem_map" panics, and
	all of them had sysctl_rtable() in the stack trace.

	Upon looking at the code for sysctl_rtable() it does appear as
	though it will loop, allocating memory effectively without bound,
	as a temporary buffer.

	Sorry, I don't have a precise set of steps for preproducing the
	problem.  This AP has been running fine for quite some time, but
	started acting up just today.