From root@eco.ing.unipi.it  Tue Dec  3 03:41:44 1996
Received: from eco.ing.unipi.it ([131.114.83.21])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id DAA04181
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 3 Dec 1996 03:41:42 -0800 (PST)
Received: (from root@localhost) by eco.ing.unipi.it (8.8.3/8.7.3) id MAA00349; Tue, 3 Dec 1996 12:38:28 GMT
Message-Id: <199612031238.MAA00349@eco.ing.unipi.it>
Date: Tue, 3 Dec 1996 12:38:28 GMT
From: luigi@iet.unipi.it
Reply-To: luigi@iet.unipi.it
To: FreeBSD-gnats-submit@freebsd.org
Subject: missing bzero in ed_attach_NE2000_pci
X-Send-Pr-Version: 3.2

>Number:         2141
>Category:       kern
>Synopsis:       missing bzero in ed_attach_NE2000_pci causes panic
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec  3 03:50:02 PST 1996
>Closed-Date:    Tue Dec 3 08:08:14 PST 1996
>Last-Modified:  Tue Dec  3 08:08:34 PST 1996
>Originator:     Luigi Rizzo
>Release:        FreeBSD 2.2-961014-SNAP i386
>Organization:
DEIT
>Environment:
	ne2000 pci


>Description:

	function ed_attach_NE2000_pci() in if_ed.c passes
	an uninitialized block of memory (got with malloc())
	to ed_attach. This prevents a proper initialization
	of the device descriptor and in my case causes a panic
	during the probe, while printing out device info.

>How-To-Repeat:

	boot...

>Fix:
	
	Very simple: stefan Esser might take care of it ?


--- if_ed.c.orig	Fri Oct 11 15:19:23 1996
+++ if_ed.c	Tue Dec  3 12:32:18 1996
@@ -1854,6 +1854,7 @@
 	if (!sc)
 		return sc;
 
+	bzero(sc, sizeof *sc);
 	if (ed_probe_Novell_generic(sc, port, unit, isa_flags) == 0
 	    || ed_attach(sc, unit, isa_flags) == 0) {
 		free(sc, M_DEVBUF);

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Tue Dec 3 08:08:14 PST 1996 
State-Changed-Why:  
Done, thanks! 
>Unformatted:
