Date: Thu, 25 Jan 2001 00:42:53 -0800 (PST) From: brandt@fokus.gmd.de To: freebsd-gnats-submit@FreeBSD.org Subject: kern/24628: if netgraph seriously runs out of queue entries it crashes the kernel Message-ID: <200101250842.f0P8gru84784@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 24628
>Category: kern
>Synopsis: if netgraph seriously runs out of queue entries it crashes the kernel
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 25 00:50:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Harti Brandt
>Release: CURRENT
>Organization:
GMD Fokus
>Environment:
FreeBSD beagle.fokus.gmd.de 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Wed Jan 24 10:15:13 CET 2001 hbb@beagle.fokus.gmd.de:/opt/obj/usr/src/sys/BEAGLE i386
>Description:
The function ng_getqblk() in ng_base.c allocates queue entries. If it
fails to allocate one, it drops out of a loop in that function and,
just before returning to the caller, tries to clear the NCGF_FREE flag
on the entry it is about to return. If the allocation has failed, this
will access a NULL pointer.
>How-To-Repeat:
Use up all available kernel memory and try to send netgraph messages.
>Fix:
Replace:
item->el_flags &= ~NGQF_FREE;
By:
if(item)
item->el_flags &= ~NGQF_FREE;
at the end of ng_getqblk().
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101250842.f0P8gru84784>
