Subject: kern/9749: Race condition in scsi_probedev
To: None <netbsd-bugs@netbsd.org>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: netbsd-bugs
Date: 04/05/2000 14:58:21
Date: Sat, 1 Apr 2000 18:35:16 +0200 (CEST)
From: Lennart Augustsson <augustss@augustsson.net>
Reply-To: augustss@augustsson.net
To: gnats-bugs@gnats.netbsd.org
Subject: Race condition in scsi_probedev


>Number:         9749
>Category:       kern
>Synopsis:       Race condition in scsi_probedev
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 01 08:39:01 PST 2000
>Closed-Date:    
>Last-Modified:  
>Originator:     Lennart Augustsson
>Release:        NetBSD-current 2000-04-01
>Organization:
Department of Computing Science, Chalmers University
>Environment:

	
System: NetBSD opus 1.4X NetBSD 1.4X (OPUS) #103: Wed Mar 29 02:25:17 CEST 2000 augustss@opus:/usr/src/sys/arch/i386/compile/OPUS i386




>Description:
	The function scsi_probedev() has a static variable, inqbuf, that is
	used during probing.  This is bad, since there may be several threads
	that are doing probing at the same time, and thereby sharing the
	same buffer.
>How-To-Repeat:
	Code inspection.
>Fix:
	Allocate the buffer dynamically or move it into the scsibus_softc
	or scsipi_link.
>Release-Note:
>Audit-Trail:
>Unformatted: