From nobody@FreeBSD.org  Thu Nov 15 13:36:57 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id CE45837B416
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Nov 2001 13:36:56 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id fAFLau070133;
	Thu, 15 Nov 2001 13:36:56 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200111152136.fAFLau070133@freefall.freebsd.org>
Date: Thu, 15 Nov 2001 13:36:56 -0800 (PST)
From: David Hill <david@phobia.ms>
To: freebsd-gnats-submit@FreeBSD.org
Subject: open() bpf crashes system
X-Send-Pr-Version: www-1.0

>Number:         32019
>Category:       kern
>Synopsis:       open() bpf crashes system
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    phk
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 15 13:40:01 PST 2001
>Closed-Date:    Thu Nov 15 15:28:02 PST 2001
>Last-Modified:  Thu Nov 15 15:28:25 PST 2001
>Originator:     David Hill
>Release:        5.0-CURRENT
>Organization:
>Environment:
FreeBSD rain.hill.hom 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sat Nov 10 11:06:32 GMT 2001
     root@rain.hill.hom:/usr/src/sys/i386/compile/RAIN  i386

>Description:
The following code crashes the system.

/* code */
#include <err.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>

int main(void)
{
	int fd;
	char device[] = "/dev/bpf000000";
	
	if ((fd = open(device, O_RDONLY)) < 0)
		err(1, "open");

	close(fd);
	return 0;
}
>How-To-Repeat:
As root, compile the code and execute it.

>Fix:
unknown
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->phk 
Responsible-Changed-By: des 
Responsible-Changed-When: Thu Nov 15 13:56:20 PST 2001 
Responsible-Changed-Why:  
Looks like a DEVFS / cloning problem, which makes it phk's baby. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32019 
State-Changed-From-To: open->closed 
State-Changed-By: fenner 
State-Changed-When: Thu Nov 15 15:28:02 PST 2001 
State-Changed-Why:  
Fixed in rev 1.101 of sys/kern/kern_conf.c 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32019 
>Unformatted:
